Use the Create New event to create new records, requests, menus and menu items.
When creating a record or request, FileMaker Pro returns a reference to the new object in the form of an object specifier such as record ID 5 of database "Contacts" of application "FileMaker Pro".
Records can be added either to the found set or the entire set of records by specifying the document or database objects. By default, FileMaker Pro adds new records to the found set. Speci
Appl
sending
apple
events
filemaker
scripts
sounds
specifying
specifying
objects
suite
suites
supported
supported
reference
forms
components
apple
event
filemaker
suite
object
model
transactions
types
apple
events
capplication
ccell
ccolumn
cdatabase
cdocument
cfilemakerscript
cmenu
cmenuitem
crequest
ctable
cwindow
application
database
document
field
filemaker}
filemaker
script}
layout
record
request
script}
window
filemaker
databasey
filemaker
document{
filemaker
document
window
filemaker
field|
filemaker
request
filemaker
layout~
filemaker
record
filemaker
script}
macintosh
applicationw
applicationw
databasey
document{
fieldx
filemakery
layout~
macintoshw
particularx
recordx
request
script}
value
field
particular
recordx
valuex
window
typechar
typeintltext
typeobjectspecifier
floating
paccess
pbesttype
pbounds
pchecked
pchoices
pclass
pcurrentlayout
pcurrentrecord
pdefaulttype
penabled
pformula
pglobalvalue
phasclosebox
phastitlebar
pindex
floating
pisfrontprocess
pismodal
pismodified
pisresizeable
piszoomable
piszoomed
pitemnumber
pkind
plock
pname
pname
pnullsok
pomitted
pprotection
prepeating
prepeatsize
ptargetid
puniquevalue
pvalue
pversion
pvisible
access
address
bestw
typew
bounds
cellvalue
checked
choices
class
close
currenty
current
layouty
current
recordy
defaultw
default
typew
enabled
floating
formula
frontmost
globalvalue
close
title
index
number
layouty
modal
modified
notify
notify
address
nulls|
nulls
number
omitted
protection
recordy
repeatx
repeat
sizex
repeats
resizeable
sizex
title
typew
unique|
unique
value|
value|
version
visible
zoomable
zoomed
aboutw
accessy
applicationw
associatedx
bestw
bounds
calculationx
cellx
checked
classw
class
objectw
close
contain|
containingw
containing|
contentsx
currenty
currently
databasey
defaultw
default
descriptor
classw
definedx
descriptorw
descriptor
containing
about
classw
document{
don't
empty
empty
filemaker
records
don't
names
enabled
false|
false
field
value|
fieldx
filemaker}
floating
formulax
front-mostw
front-to-back
globalx
have|
index
indicates~
indicates
whether
table
table
layout~
infow
global
cellx
field
global
field|
layout
visible
layouts
menu~
item's
layouty
layouts~
listx
locked{
lockingx
makesx
media{
menu~
menu's
modal
must|
namew
applicationw
names
non-repeating|
notify
numberw
objectw
omitted
ordering
persistent}
privilegesy
protectionx
read-only{
recordy
records
repeating|
repetitionsx
request
resized
resource
rfxd|
defined
repeating
non-repeating|
rsgl|
script}
selected
statusx
table~
target
target
application
notify
selected
thatx
access
current
access
current
user~
access
privileges
current
usery
bounds
window
calculation
formula
cellx
calculation
formula
field|
contents
cellx
current
layout
databasey
current
record
databasey
index
front-to-back
ordering
window
locking
status|
locking
status
databasey
locking
status
layout~
locking
status
record
locking
status
cellx
item's
item's
number
index
menu's
menu's
resource
databasey
document{
field|
field
makes
cellx
filemaker
script}
layout~
request
window
number
repetitions
defined
cellx
number
repetitions
defined
field|
persistent
unique
filemaker
script}
protection
field|
protection
layout~
protection
cellx
protection
record
unique
cellx
unique
field|
unique
layout~
unique
record
unique
request
user's
access
privileges
field|
user's
access
privileges
record
value
associated
cellx
value
associated
field|
thisw
title
truew
database
read-only
locked
media{
application
front-most
field
contain
unique
value|
enabled
currently
checked
request
omitted
window
resized
window
close
window
title
window
window
floating
window
window
currently
zoomed
window
modal
window
visible
typew
uniquex
usery
user's|
valuex
versionw
version
number
applicationw
visible~
whether~
window
withx
zoomed
cboolean
cchar
cenumeration
clonginteger
cobjectspecifier
cqdrectangle
ctype
cversion
typetargetid
ccell
ccolumn
cdatabase
cdocument
cfilemakerscript
cmenu
cmenuitem
crequest
ctable
cwindow
installed
menusw
cells|
column|
contains{
currentlyw
data|
databasey
document
documentw
documentsw
fields~
find~
found~
installedw
items
layout~
layoutsy
menusw
openw
record|
records~
request
requests~
scriptsy
cells
record
column|
cells
record
layout~
cells
record
record
cells
request
request
currently
documentsw
database
document
contains{
database
window
contains
document
window
fields
layout~
requests
layout~
items
layouts
databasey
document
windowsw
records
found
scripts
databasey
scripts
document{
scripts
window
this{
window
windowsw
absolutew
absolute
positionw
positionw
range
relativex
relative
positionx
classw
class
infow
close
count
create
dataw
sizew
delete
script}
duplicate
exist
exists
dataw
infow
print
script}
datax
sizew
field
column
column
spreadsh|
called|
cell|
column|
data|
field|
just|
like|
particular|
record|
spreadsheet|
kaecoresuite
kaedatabasesuite
kaefilemaker
kaemiscstandards
kaerequiredsuite
kaeurl
kaebegintransaction
kaeclone
kaeclose
kaecountelements
kaecreateelement
kaedelete
kaedomenu
kaedoobjectsexist
kaedoscript
kaeendtransaction
kaefind
kaegetclassinfo
kaegetdata
kaegetdatasize
kaegeteventinfo
kaegeturl
kaegoto
kaemakeobjectvisible
kaeopen
kaeopenapplication
kaeopendocuments
kaeprint
kaeprintdocuments
kaequitapplication
kaesave
kaesetdata
kaesort
keyaedata
keyaeinserthere
keyaeobjectclass
keyaepassword
keyaepropdata
keyaerequestedtype
keyaesortelement
keyaesorttype
keydirectobject
typeaelist
typeaerecord
typealias
typechar
typeenumeration
typeinsertionloc
typeobjectspecifier
typetype
varies
order
preference
desired
typeF
password
fileR
aliasV
classB
closeC
containerD
countD
createE
dataE
databaseP
deletedG
desiredF
display
duplicateJ
elementD
element'sE
eventL
fields
fileR
filemakerP
findN
foundM
groupN
initialE
itemH
layout
listF
locationE
menuH
navigateQ
objectB
objectsG
openedR
orderF
passwordR
performedH
placeJ
preferenceF
printedW
propertiesE
queryB
recordV
recordsN
results
savedZ
scriptI
specificationP
suiteL
alias
printedW
alias
record
openedV
container
objectD
element
class
countD
element
class
createE
event
class
suite
which
queryL
fields
which
initial
element's
propertiesE
initial
elementE
layout
which
display
results
location
elementE
performedH
object
class
queryB
object
whose
desiredO
object
openedR
object
printedX
object
savedZ
object
closeC
object
duplicateJ
object
navigate
object
whose
desiredF
object
whose
objects
deletedG
objects
foundM
objects
order
which
script
performedI
specification
filemaker
databaseP
window
which
group
recordsN
typeF
whereJ
where
place
duplicateJ
whichL
whoseF
windowN
keyaeresult
typeaelist
typeboolean
typeclassinfo
typeeventinfo
typelonginteger
typeobjectspecifier
dataF
elementE
elementsD
existsM
informationB
addition@
applescript
language
guide
english
dialect@
using
objects
other
applications
california@
contain@
describe
desired@
events@
filemaker
supports
simple
object
specifiers
filemaker
supports
events
objects
defined
four-character@
specify
ccolumn
elements
ctable
object
correspond
toll-free
sending
events
filemaker
performs
analysis
sending
apple
events
filemaker
scripts@
filemaker
record@
pnamex
floating@
containing|
field
global
field@
access
current
user~
persistent
unique
filemaker
script@
window
title
documentw
absolute
position@
endt@
object
class
query@
closes
document
windows
documents
databases@
filemaker
supports
event
cmenu
cmenuit@
lacks@
recordsM
event
finds
group
records
specified
database@
perform
filemaker
using
current
reques@
class@
class
window@
duplicate
record
macintosh@
layout
named
screen@
bookY
includes@
result@
script
script
perform@
items
picture
reference
examples
simple
object
specifiers@
alsoy
begintransaction@
cell's@
contained|
database|
every
filemakerscript}
full@
higher@
initiating@
misc@
opening@
placed@
prps@
report@
small@
switched@
theobject@
unless@
numberD
objectE
objectsJ
requestedB
sizeF
specifierE
specifiersJ
number
elementsD
object
specifier
elementE
object
specifiers
objectsJ
requested
dataO
requested
informationB
requested
dataF
transaction
transactionA
transactionA
trueM
object
existsM
10006
accessO
aeteB
allowingK
amountA
anyoneT
appleB
applicationP
applicationsA
ascending
attempts
attributeA
becauseM
beforeP
beginsA
begins
transaction
filemaker
returns
transaction
browseQ
bytesF
cdatabase
cellsO
choosingJ
classesE
clientA
closesC
closes
document
windows
documents
databasesC
cmenuE
cmenuitemE
conjunction
correspondB
countedD
countingD
counting
number
layouts
returns
number
layoutsD
createN
creationE
criteriaN
crowE
ctable
currentN
currently
cwindow
dataB
databaseA
databasesC
defaultF
deleteG
deletionG
desired
direction
documentC
documentsC
doesG
duplicateJ
duplicatingJ
elseT
emptyM
enabledH
encouragedA
endsK
indicated
transaction
allowing
other
applications
engagedA
equivalentJ
erraebadpasswordG
erraewritedenied
errorG
evenM
eventA
eventsA
existingJ
existsM
falseM
fieldsO
fileD
filemakerA
filemaker
supports
event
cmenu
cmenuitJ
filemaker
sorts
currently
found
records
filemaker
supports
creation
cmenu
cmenuitem
filemaker
supports
deletion
cmenu
cmenuitem
filemaker
supports
navigation
records
requests
cells
filenameP
findN
finderT
findsN
fmp3P
followingP
formatsP
found
fromA
getsF
indicated
object
specifiersO
bytes
indicated
object
geturlP
groupN
haveG
helperP
hidden
hostedP
hostnameP
indicatedF
informationB
insertionJ
insideT
inside
macintosh
volume
states
finder
should
instruct
intendedM
internetP
itemJ
itemsJ
lacks
layoutD
layoutsD
likeA
listenT
locateM
locationJ
lockA
locked
macintoshT
makeP
manipulateK
menuH
minimizeA
modeQ
mustA
nameM
namesM
navigationQ
netscapeP
noteG
nullM
numberD
objectF
objects
onlyJ
opensV
opens
indicated
filemaker
documentV
operation
orderO
otherA
otherwiseM
parameterF
performingQ
performsH
performs
indicated
filemaker
scriptI
performs
indicated
enabledH
previewQ
printsW
prints
indicated
filemaker
documentW
privilegesG
proper
propertyM
protocolP
quitsY
quits
filemaker
readO
read-only
recordB
recordsG
recordsM
registerP
rememberD
requestN
requestedF
requestsN
resourceB
respondA
resultG
results
returnF
returnedG
returnsA
returns
apple
event
record
typeclassinfo
dataB
returns
apple
event
record
typeeventinfo
dataL
returns
indicated
object
exists
false
otherwiseM
reveal
scriptI
searchN
sendP
event
internet
helper
application
filemP
sendingP
object
supplied
value
shouldT
sizeF
sorts
specialD
specifiedF
specifiersF
specifyN
statement
statesT
stronglyA
subsequentA
suppliedA
supportsE
sureP
switchQ
syntaxP
tcp/ipP
tellP
thatA
event
finds
group
records
specified
theirM
theyA
thisB
thoughM
timeA
transactionA
transactionsA
trueM
typeB
typeclassinfoB
typeeventinfoL
useful
useful
cwindow
cdatabase
ctable
classes
userG
usingN
validJ
value
valuesM
volumeT
whileA
whose
willA
window
windowsC
withA
wordsM
xxxxG
aboutB
actionH
asksM
given
object
existsM
associatedH
beginA
classD
closesC
closes
indicated
objectsC
copyJ
countsD
counts
number
elements
indicated
class
createsE
creates
element
indicated
class
specifieE
currentN
dataF
databaseP
deletesG
deletes
specified
objectG
action
associated
itemH
documentsV
elementE
elementsB
eventT
eventsL
existsM
fields
filemakerI
filesW
findN
finderT
fromF
getsF
specified
objectO
specified
objectF
givenM
indicatedB
infoB
itemH
layout
makesJ
makes
indicated
objectJ
makes
specified
objects
visible
menuH
navigatesQ
navigates
objectQ
noteT
numberD
objectB
objectsC
onlyT
openP
filemaker
database
using
specificationP
opensR
opens
indicated
documentsV
opens
indicated
objectsR
operationsT
performI
perform
filemaker
using
current
requesN
perform
filemaker
scriptI
performsT
performs
startup
operations
filemaker
findT
printsW
prints
indicated
filesW
prints
indicated
objectsX
propertiesB
quitsY
quits
filemaker
requestA
request
begin
transactionA
request
transactionK
requestsB
requests
about
events
suiteL
requests
about
properties
elements
indicB
savesZ
saves
indicated
objectsZ
scriptI
sendT
object
shouldT
sizeF
sorts
sorts
indicated
layout
specified
fields
specificationP
specifiedD
startupT
suiteL
thisT
transactionA
usingN
visible
withH
applicationT
beginA
begin
transactionA
classB
class
infoB
close
count
createE
create
dataF
sizeF
delete
menuH
scriptI
documentsV
duplicate
transactionK
eventL
event
infoL
exists
filesW
dataO
geturl
infoB
menuH
objectsX
applicationT
documentsV
printW
print
filesW
print
objectsX
scriptI
sizeF
transactionA
order
order
afterQ
aliasR
applicationT
battersW
beginA
begin
transactionA
brendan
catalogP
cellQ
checked
clarisP
classB
class
object
classB
class
windowB
closeC
close
database
named
sales
reportsC
close
object
specifierC
close
window
contactsN
containerD
coreL
countD
count
container
object
class
desired
classD
count
database
named
sales
class
layoutD
createE
create
class
create
insertion
location
currentQ
custom
dataE
every
field
layout
window
object
specifier
desired
typeF
table
named
field
sales
report
textF
databaseC
dataofO
deleteG
delete
recordG
delete
object
specifierG
desiredD
direction
named
externalH
named
selectH
object
specifierH
script
filemaker
script
named
print
reportI
script
object
specifierI
duplicateJ
duplicate
object
specifier
insertion
locationJ
duplicate
record
transactionK
entryQ
eventL
event
coreL
event
event
classL
event
fmprL
everyF
existsM
externalH
false
fieldF
field
existsM
fields
fileV
filemakerI
findN
window
window
contactsN
window
object
specifierN
firstname
fmp3P
fmprL
layout
named
field
sales
reportO
every
field
layout
object
specifier
desired
typeO
dataof
window
geturlP
geturl
claris
product
catalogP
geturl
stringP
geturl
claris
product
catalogP
record
recordQ
layout
entryQ
object
specifierQ
record
after
current
recordQ
infoB
initialE
insertionE
itemH
lastG
layoutD
layout
existsM
locationE
macintoshW
mccarthy
menuH
menuitem
monthly
nameF
namedC
objectB
object
specifier
existsM
omitH
openR
aliasR
alias
password
thepasswordR
applicationT
aliasV
order
passwordR
printI
print
alias
aliasW
print
alias
macintosh
battersW
print
object
specifierX
productP
propertiesE
propertyE
recordG
region
reportF
reportsC
salesC
saveZ
object
specifierZ
screen
scriptI
selectH
named
firstname
record
brendan
checked
menuitem
named
external
object
specifier
visible
window
false
every
record
whose
named
mccarthy
layout
named
screen
object
specifier
window
sizeF
field
field
field
direction
custom
fields
order
direction
layout
named
monthly
sales
report
field
named
region
specifierC
state
stringP
tableF
tellY
application
filemaker
quitY
textF
thepasswordR
transactionA
typeF
valuesE
visible
whose
windowB
withE
aboutY
aboveY
accordingY
additionalY
allowsY
alsoY
amongY
anotherY
appearingY
appleY
areaY
arrowY
backgroundY
backwardY
blankY
boldY
bookY
browsingY
buttonY
changeY
chooseY
classY
clickY
clickingY
containedY
containmentY
contentY
continueY
dataY
databaseY
denotedY
designedY
detailedY
differentY
displayY
displayedY
displaysY
dottedY
eachY
encounterY
eventY
eventsY
everyY
exampleY
examplesY
extensionsY
fictitiousY
fieldY
filemakerY
firstY
forwardY
fromY
gettingY
givenY
givesY
grayY
groupedY
haveY
havingY
hierarchyY
hypertalkY
iconY
iconsY
includesY
indicatedY
infomationY
informationY
informativeY
inputY
intendedY
introduceY
introductionY
itemY
keywordsY
kindY
languageY
layoutY
layoutsY
linesY
listY
mainY
mannerY
menuY
modelY
moreY
moveY
navigationY
nextY
noteY
notesY
objectY
objectsY
openY
optionY
optionalY
optionsY
parametersY
particularY
pop-upY
presentedY
previousY
provideY
providesY
reachedY
recordY
recordsY
registryY
respectivelyY
resultY
returnY
rightY
sameY
samplesY
screenY
scriptsY
severalY
similarY
someY
specificY
standardY
statusY
suitesY
suppliedY
supportY
supportedY
supportsY
switchY
syntaxY
terminologyY
textY
thatY
theirY
themY
theseY
thisY
database
designed
introduce
users
support
throughY
throughoutY
titleY
usedY
usersY
usesY
usingY
varietyY
viewY
wellY
whenY
whichY
whileY
willY
withY
withoutY
absolute
access
accomplish
addition
after
alias
apple
apple
event
components
examples
applescript
applet
application
assume
based
before
between
cdatabase
cdocument
cells
choices
choose
class
class
close
close
application
coerce
command
commands
complex
complex
object
specifiers
components
containing
contains
create
create
document
current
customers
layout
database
databases
defined
delete
delete
different
directs
script
script
perform
document
documents
droplet
elements
entry
event
event
event
class
event
parameters
events
events
verbs
objects
nouns
every
example
examples
execute
exists
exists
window
field
fields
filemaker
files
first
folder
folderpath
following
frontmost
gloves
however
importing
importing
single
picture
reference
using
choose
following
examples
assume
entry
index
index
document
named
invoice
invoices
items
items
itself
layout
macintosh
monthly
field
total
sales
index
relative
absolute
unique
named
necessary
newrecord
filemaker
support
sending
apple
event
nouns
object
object
class
components
filemaker
document
window
objects
obtain
application
documents
documents
record
ordinal
ordinal
every
record
other
parameters
pbounds
pbounds
pisresizeable
cdatabase
perform
phasclosebox
phasclosebox
piszoomable
phastitlebar
phastitlebar
piszoomed
picture
picture
reference
examples
picture
reference
examples
picturefile
picturefileref
pindex
pindex
pvisible
pisfloating
pismodal
pisresizeable
piszoomable
piszoomed
pname
portal
previous
print
print
documents
documents
print
product
properties
properties
pname
pismodal
elements
cdocument
pvisible
application
range
range
layout
record
records
reference
reference
examples
related
relational
relational
examples
relationship
relative
repeat
report
request
result
returns
revised
routine
sales
script
scripting
scriptmaker
scripts
scripts
following
statements
revise
sending
shoes
simple
simple
object
specifiers
single
specifiers
state
statements
string
support
syntax
window
whose
title
monthly
report
there
these
through
title
total
unique
using
verbs
whose
window
10006
10thx
199.99.99.99P
199.99.99.99/productP
3.0v1w
intersection
record
field
abbreviatedL
abilityI
aboutL
abovew
acceptA
acceptsP
accessB
accessedw
accessible
accessingZ
accidentallyH
accomplishedQ
across|
activateQ
activeZ
actual{
addedB
addingE
additionW
additionalA
additionallyH
addressP
addressesC
addsE
adminR
aevtL
afterA
aliasR
allowE
allowsE
alreadyQ
alsoO
alsoy
alternativesX
alwaysF
among
analogous|
anameE
anotherD
appbesttypew
appclassw
appdefaulttypew
appearH
appearsE
appinfoT
applT
appleA
appleeventB
applescriptA
appletI
applicationA
applicationsE
applies
applyw
appnamew
appversionw
ascending
associatedx
assumeA
asteriskP
attempt
attemptingR
attributeK
attributesw
audienceB
austenE
automaticallyR
availableH
avariablex
average|
avoidI
backgroundE
basedO
battersR
battery-operatedZ
batting|
becauseI
becomeA
beenE
beepw
beforeA
beganA
beginA
beginsG
begintransactionA
begunK
behaves
being
bellamy
belongingL
belowH
beneathB
beside
bestV
betweenQ
binaryB
blankG
boldH
booleanw
bothH
boundary
bounds
brand
bring
broad
browseH
businessJ
byteF
bytesF
calculatedB
calculationx
callI
calledA
calls
cannotE
cappw
caseZ
catalogP
ccelx
ccol|
cellA
cell'sx
cellsD
cellvaluex
central{
certainA
changey
changed|
changesZ
channelsw
charE
characterF
charactersF
check
checkedE
choicesZ
choosey
clarisP
clarisworksT
classB
classesL
classinfoB
clauseO
clausesG
cleanY
clickP
clipboardQ
closeC
closedW
cmenH
cmnuH
collectiony
colonsx
column|
columns|
com/productP
commandH
commandsB
commonlyw
compactR
compilingA
completedI
complexE
components
computerZ
concludeK
conditionG
configureZ
conjunction
consecutive
consideredy
considers{
constant|
constantsH
contactQ
contactsE
contain|
containedB
contained|
containerO
containingx
containmentD
containsG
contentsQ
continueI
continuingH
continuouslyI
controlE
copiesQ
copyQ
copyingQ
coreB
correspondF
corresponding
correspondsF
couldB
countD
countedD
countingD
counts~
createE
create
scriptmaker
script
relevant
database
createdE
createsE
creatingE
creation|
criteriaO
cscp}
ctbl~
currentE
currently
cursorZ
custom
cuttingQ
dataB
data1E
data2E
databaseA
database|
databasesC
datasizeF
datex
defaultE
definex
definedx
deftw
deleteG
deletedA
deletingG
delimitedE
descending~
descriptionB
descriptionsE
designation~
designer
desktopY
detailedL
determine|
dialogI
differencesR
differentQ
directedQ
direction
directlyB
discsR
diskR
displayQ
displayed
distinguishy
docsE
docu{
documentB
documentsC
doesF
doesn't
doingX
domainP
domenuH
doneD
doscriptI
doubx
downY
duplicateJ
duplicatedJ
duplicatingJ
eachA
easilyB
editB
editedN
editorE
editsA
eitherE
elementsB
ellipseH
ellipsesH
ellipsis
emptyM
enableP
enabled
end-usersB
endedK
endsG
endtransactionK
enterE
entireE
entryH
equal
equals
equivalentX
erraewritedenied
errnumI
errorI
evaluate{
evaluatingy
evenM
eventA
eventinfoL
eventsE
everyF
every
exact
exactlyB
examinex
exampleB
examplesA
excelE
exceptw
exclude
exclusivex
execute
existx
existsM
exitZ
expectsA
extensionV
externalE
factM
falseM
fasterE
featureA
featuresI
fieldB
field
objects
sometimes
called
columns
analogous|
field'sZ
fieldsD
fifth
fileC
filemakerA
filemakerscriptB
filemakerscript}
filenameG
filesP
finallyH
findH
findapplicationT
finderT
findmeO
findsI
finishedY
firstE
floating
flowI
fmp3P
fmprL
folderT
folder1
followingA
followsB
formA
formatH
formattedx
formsP
formulax
formulasx
forthI
foundD
frequentlyZ
fromA
front
frontierA
frontmostN
fullx
functionalA
functionalityK
furtherR
gearedB
generalP
generateH
generated
getasO
getclassinfoB
geteventinfoL
getfiledialogT
getpropertyw
getsx
gettingB
geturlP
globalx
globalsw
globalvaluex
goingA
grayed
greater
groupA
groups
gteiL
guestP
gurlL
handledF
hardR
harddisk
hasn't|
haveA
helpI
helperP
helpfulZ
hereI
alternatives
using
print
eventX
hidden
hides
hierarchical
hierarchyB
higher
hostP
hostedP
hostingP
hostnameP
howeverD
hrefP
htmlP
humanlanguageB
hypercardE
identifierx
ignoreD
illustrates
image
imod{
implementI
importI
importantD
importedO
inactive
includeD
includedD
includesx
includingL
indentifying}
indexH
indicatesw
indicatingx
infoB
informationB
initialE
initiatingw
insertionlocJ
insertlocE
installedA
instanceQ
insteadT
integerO
internal~
internetP
intersectionx
intlB
intoO
invalid
involvedI
isn'tZ
it'sW
itemB
item2
item3
itemsD
janeE
jonesx
justW
kaeopendocumentsR
kaerequiredsuiteR
keepE
keyformsO
kind~
knownD
langcodeB
lastE
laterK
launchT
layoutB
layout-specific~
layoutsD
least
leavingZ
lengthenI
lessZ
lesser
letsB
level
likeE
lineE
listB
lists~
localB
locateM
locationE
locatorP
lockx
looksB
lookup
machineP
macintoshQ
macwriteT
mainw
makeM
makes
makewritingcodeB
manipulateK
manipulationE
manipulation-seeE
masterx
matchH
matchesG
matchingG
maximumx
meaningw
mechanismF
meetingI
menuB
menu's
menu2
menuitemB
menusE
merelyP
middleO
might
mindE
miscH
miscellaneousL
modal
modeG
modesH
modified{
monthly
moreB
mostA
users
probably
feature
moveQ
movies
muchW
multipleA
mustA
myfirstmenu
mymenuE
mymenuitemH
myscript
mysecondmenu
nameB
namedG
nameofwindowC
namesB
narrow
navigateE
navigatingQ
navigationQ
neccessaryy
necessaryQ
needA
neededY
nestedE
nestingH
netscapeP
networkingP
neverD
newdata
newname
nextI
non-repeatingx
normallyD
noteA
notebookZ
notifyE
nullG
nulls|
nullsok|
numberF
numbered
objectB
objectsB
obtainx
omitH
omittedE
ommited
onceP
onlyA
openJ
opendocpasswordR
opendocumentR
opendocwithpasswordV
openingR
operateD
operatedw
operatingQ
operatorsG
optionE
option-semi-colon
option-semicolonH
orderK
ordersI
ordinarilyV
otherE
overE
pacsy
pageI
parameterE
parametersL
partI
particularD
particularlyB
passwordR
passwordsR
pasteQ
pastesQ
pathT
pbstw
pchsx
pclsw
pclyy
pcrwy
performI
performanceE
performingQ
periodI
periodicallyZ
persistentx
pforx
pictO
pictureO
picturesO
piece|
pisfw
pitchersR
pknd~
placeA
placedE
planJ
plckx
pnamw
pnls|
popup~
portalsQ
positionO
possibleH
powerZ
ppasV
pprox
preferenceP
presentY
prevI
previewQ
previousO
printI
printdocumentW
printedW
printingI
privilegesH
probablyA
processI
processingK
productP
productsP
propertiesB
propertyE
protectedR
protectionx
protectsH
protocolP
provideB
providedA
providingR
prpsx
prpt|
pulledY
punq|
qobjB
quarterly}
queryw
queryingB
quicktime
quitY
quitapplicationY
randomO
rangeO
readO
read-only
read-write
readsB
readyI
realize|
really~
reasonsD
receiveI
receivedK
recompileA
recordB
recordsD
rectangle
referI
referenceE
referredH
referringH
refersC
regardlessy
region
registerP
relatedx
related
cells
accessed
apple
events
relationshipx
relativeO
relevantX
relookupH
remainW
remember
reorder
repeatA
repeatingQ
repeatsx
repetitionQ
repetitionsQ
replaceP
replyL
reportC
reportsJ
representedx
representingP
requestD
requestsA
requireR
requiredL
requiresQ
resizable
resolvedH
resourceP
respectivelyL
respondE
restoreI
restoresI
restrict~
resultO
resultsJ
retrieveF
retrieved~
retrieves
returnB
returnedA
returnsA
rfxd|
rootA
routineI
rowsQ
rsgl|
runningI
salaryO
salesC
sameR
samplew
saveZ
savedZ
savesZ
screen}
scriptA
scriptcodeB
scriptmakerI
scriptsD
searchP
secondG
secondsI
sectionR
securityH
selectQ
selectedE
selects
sendI
sendingI
senseZ
sentT
separatedx
separators
seriesY
session{
setbinarytypeB
setproperty
settingA
setupsI
severalE
sharedx
shirtZ
shortB
shouldT
showx
showingB
shown
showsw
similarlyx
simpleB
simplyB
simultaneouslyA
sinceF
singleO
sizeF
small
smithw
someE
somedata
somethingQ
sometimesD
sort|
sorted
sorting
sortsI
soundsO
sourceQ
specificR
specifiedL
specifierC
specifyE
specifyingE
spreadsheet|
start
stateA
statementA
statementsw
statesy
statusx
stillZ
storeO
storedw
storesF
stringE
string4H
styleH
submenuE
subsequent
successfullyA
suchE
suggestionsI
suiteL
summaryQ
suppliedR
supportQ
supportedL
supposedT
suppressedW
sureM
swain
switchQ
switchedG
symbol
symbols
synonyms{
syntaxB
systemQ
tableA
tables~
takesx
targetQ
tcp/ipP
technicalB
tellA
application
filemaker
tellsT
temporaryy
terminology
testC
testfile{
textF
thanQ
thatA
event
three
components
syntax
print
event
simple
thedataE
their
thenI
theobjectw
thepasswordV
thepropertyw
thereE
therebyE
thereforeZ
these
theyE
things{
third
thisA
thoseG
thoughM
three
throughF
thusB
timeE
timeoutI
timeoutsI
times
title
today's
topmostx
transactionA
transactionidK
transactionsA
transferringQ
treats
triggerH
trueE
typeO
typedZ
typesO
typically|
unableI
under
understandingD
understoodB
uniquex
universalP
unlessR
unlike{
unlockedx
unsort
untilG
updatex
updatingZ
script
event
trigger
script
filemakerI
transaction
event
conclude
transaction
thatK
field
object
manipulate
across
records
object
access
commands
filemaker
event
databases
documentsR
print
event
print
filemaker
fileX
event
reorder
currently
found
records
usedG
usefulA
userB
user-created
user-definedE
userlandL
usersA
usingB
usingL
valueF
valuesM
variablex
verbB
verbsE
versw
versionE
veryB
visible~
vluex
waituntilreadyI
wantF
web-browserP
wereW
whatA
whenE
whenever~
whereA
whereas
whetherE
whichE
whileI
whoseG
usingL
will@
script@
exists@
willA
windowB
window1
windowname
windowsC
wishP
withA
withinQ
withoutE
won'tM
wordA
workI
workingH
worksM
wouldZ
wrcdB
writeI
writingcodeB
yourR
zoneP
zoomable
zoomed
applicationT
beginA
begin
transactionA
classB
class
infoB
close
count
createE
create
dataF
sizeF
database
delete
menuH
scriptI
document
documentsV
duplicate
transactionK
eventL
event
infoL
exists
field
filemaker}
filemaker
script}
filesW
dataO
geturl
infoB
layout
menuH
objectsX
applicationT
documentsV
printW
print
filesW
print
objectsX
record
request
scriptI
sizeF
transactionA
window
applicationT
beginA
begin
transactionA
capplication
ccell
ccolumn
cdatabase
cdocument
cfilemakerscript
classB
class
infoB
close
cmenu
cmenuitem
count
createE
create
crequest
ctable
cwindow
dataF
sizeF
database
delete
menuH
scriptI
document
documentsV
duplicate
transactionK
eventL
event
infoL
exists
field
filemaker}
filemaker
script}
filesW
dataO
geturl
infoB
layout
menuH
objectsX
applicationT
documentsV
printW
print
filesW
print
objectsX
record
request
scriptI
sizeF
transactionA
window
event
intro
object
DESCRIPTION
ECLASS
ECLASSID
EDESC
' EEXAMPLES
EIDID
ENAME
ENOTES
EPARAMDESC
EPARAMID
+ EPARAMREQ
EPARAMS
EPARAMTYPE
EPARAMUT
ERESULT
ERESULTDESC
% ERESULTID
ERESULTREQ
ERESULTTYPE
# ERESULTUT
FIND CONCAT
GO TO LAYOUT
HELPTEXT
/ HELPTITLE
INTRORECORDTITLE
INTROTEXT
OCLASS
OCLASSDEFAULTTYPE
OCLASSDESC
OCLASSELEM
OCLASSELEMDESC
OCLASSELEMMOD
OCLASSEVENTS
OCLASSID
OCLASSKEYFORMS
OCLASSPROP
OCLASSPROPDESC
OCLASSPROPID
OCLASSPROPMOD
OCLASSPROPTYPE
OCLASSPROPUT
OCLASSUT
ONOTES
ORIGINAL LAYOUT
PICTTEXT
RECORD TYPE
RECORDNUMBER
THING
WHAT'S NEW
US English - Spelling
x35-debug
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
January
February
March
April
August
September
October
November
December
1st Quarter
2nd Quarter
3rd Quarter
4th Quarter
12/5/955
,@+A Main Menu
Introduction to Apple events
Object Map
Object Hierarchy
Event Data
Object Data
Objects and Events List
Table of Contents
Descriptions and Examples
Events & Objects Matrix
What's New
A Main MenuB
A IntroTextB
IntroRecordTitleB
RecordNumberB
OClassB
OClassIDB
OClassUTB
OClassDescB
OClassDefaultTypeB
OClassPropB
OClassPropIDB
OClassPropUTB
OClassPropDescB
OClassPropTypeB
OClassPropModB
OClassElemB
OClassElemDescB
OClassElemModB
OClassKeyFormsB
OClassEventsB
ONotesB
EClassB
EClassIDB
ENameB
EIDIDB
EParamsB
EParamTypeB
A EParamReqB
EParamDescB
EResultB
EResultTypeB
EResultReqB
EResultDescB
ENotesB
EDescB
EParamUTB
*A EResultUTB
EParamIDB
,A EResultIDB
-A EExamplesB
.A HelpTitleB
HelpTextB
pictTextB
DescriptionB
ThingB
Find ConcatB
Record TypeB
Go to LayoutB
5 = "Event"
"") &
5 = "Object"
"") &
5 = "Help"
"") &
5 = "Intro"
"") &
Event
Object
Intro
What's NewB
Original LayoutB
New for FileMaker Pro 3.0v1
Converting Scripts
In order to take advantage of some of the new capabilities of FileMaker Pro 3.0, scripts that were created for previous versions of FileMaker Pro that use the Show event will need to be modified. See Introduction to Apple Events - Converting Previous Scripts for more information.
Requests
FileMaker Pro 3.0 now has the ability to create, edit, count, and delete find requests using the Request object. Requests are similar to records
you can
manipulate the entire request or cells contained within the request. This can be used to save find requests, quickly find records, and create find requests with FileMaker Pro find symbols. See FileMaker Events - Requests for more information.
Relational Data Access
Related fields placed on layouts can be accessed via Apple events. Fields and cells within portals can be edited and related records created and deleted using standard Apple events such as Set Data, Create, and Delete. See Int
roduction to Apple Events - Relational Data Access for more information.
Go To Event
The Go To event allows you to navigate to FileMaker Pro objects such as databases, layouts, records, and cells. For instance, the Go To event can be used to tab into a field. See FileMaker Events - Go To for more information.
GetURL
FileMaker Pro 3.0 supports the opening of databases over the Internet when hosted with TCP/IP. This event from the URL suite allows applications such as Netscape to open a
FileMaker Pro database from a Web page. See FileMaker Events - GetURL for more information.
Picture File References
It is now possible to import pictures via Apple events using a reference to the file. This allows the scripter to automate the importing of large numbers of images while keeping the size of the database small. It also provides an easy way to open an image with another application. See Introduction to Apple Events - Pictures, Movies, Sounds, and Data Types for more informat
Narrowing Found Sets
Using the Show event with the Database object selects records from the entire database. A Show event directed at a Document, however, retrieves records from the current found set. With the Document object, you can start with a broad search criteria and narrow the found set with subsequent Show events. See FileMaker Events - Show for more information.
Global Fields & Merge Fields
Fields and cells now have a globalValue property that can be used to determine wheth
er a field is global or not. In addition, merge fields can be accessed through Apple events using Get Data and Set Data events. See FileMaker Objects - Field for more information.
Visible Property of Layouts
Because layouts can now be hidden, there is a new property that indicates whether or not the layout is visible in the layout popup menu. See FileMaker Objects - Layout for more information.
Retrieving Lists of Objects
It is now possible to retrieve multiple objects by specifying a li
st of IDs. For instance, the following statement will find all records whose IDs are in a list:
show every record whose ID is in {1, 2, 3}
Cell and Field ID
Cell and field ID
s now include relationship identifiers. If a field is related, the ID is returned as a list with two parameters - the relationship identifier and the field identifier. For example, a field ID of {1, 2} is the unique identifier for a related field using the relationship whose identifier is one and the field fro
m the related file whose ID is two. See Introduction to Apple Events - Relational Data Access and FileMaker Objects - Cell and Field for more information.
Current Record and Current Layout
When using the current record and current layout properties of a database it is no longer necessary to specify the database object. For instance, a statement such as get current record will return a reference to the current record from the frontmost database. See FileMaker Objects - Database for more
information.
Creating & Duplicating Returns an Object Reference
When creating or duplicating a record or request, FileMaker Pro 3.0 now returns a reference to the new object in the form of an object specifier. See FileMaker Events - Create and Duplicate for more information.
Version Property
The application
s version property now returns the application version information from the version resource (
) instead of an integer that requires conversion. See FileMaker Objects - Applicat
ion for more information.
Background Operation
You now have the option of adding new records to the found set or the entire set of records by using the document and database objects. By default, FileMaker Pro adds new records to the found set. Specifying the database object with a create or duplicate event, however, will add the new record to the entire record set, thereby adding it "in the background" if there is a current found set. This allows for faster performance when creating rec
ords. To navigate to a created record, use the Go To event, as in go to (create record). See FileMaker Events - Create for more information.
Value Lists
The Choices property of fields and cells can be used to obtain the value list defined for a field. Because value lists are now assigned to fields in layout mode, the Choices property is layout-specific. In this way a field can have different value lists depending on what layout it is on. It is now possible to get the index values of a
M field by retrieving using the Choices of a field when it has the option to base the value list upon a field. See FileMaker Objects - Field and Cell for more information.
Blank Passwords
You can now open FileMaker Pro databases with a blank password by specifying an empty string. See FileMaker Events - Open for more information.
Introduction to Apple eventsB
E=Copyright
1988-1995 Claris Corporation.
All Rights Reserved.FAPlease click on the text or icon of an area.
Click here for Help.
What's New?H
HelpI
Find an Event or ObjectJ
Descriptions
and ExamplesK
Apple Events & Objects MatrixL
Objects & Events ListM
FileMaker Object HierarchyN
FileMaker ObjectsO
FileMaker Object MapP
FileMaker EventsR
Introduction to Apple EventsS$FileMaker Pro Apple Events
ReferenceT$FileMaker Pro Apple Events
Reference
Object MapB
MenuO
Introduction
to Apple Events
Object HierarchyB
GetURLJ URL SuiteK
MenuM
FileMaker Pro Object MapN
Go ToO
FindP
cRequestQ
Click the names above for more detailed information about the Events and Objects. To understand more about
the relationships of the Objects to each other, click the Object Hierarchy button.
ExistsT
Print DocumentsU
Quit ApplicationV
Open DocumentsW
Required SuiteX cMenuItemY
Set DataZ
Print[
Save\
Open]
Event Info^ Data Size_
Get Data`
Class Infoa
Deleteb
Create Newc
Countd
Closee Duplicatef cDocumentg
cWindowh
cApplicationi
Core Suitej
End Transactionk
Begin Transactionl Do Scriptm
Do Menun
cMenuo
Miscellaneous Standards Suitep
cFileMakerScriptq
FileMaker Suiter
Sorts cDatabaset
cCellu
cColumnv
cRoww
cTablex
Database/Table Suitey
Open Application
FileMaker Pro 3.0 supports most of the objects and events defined in the Core, Table, and Database Suites, as well as parts of the Miscellaneous Standards Suite and a custom suite for objects and events specific to FileMaker Pro.
Event DataB
MenuJ
Containment Hierarchy
cCell
Request
cRequest
Field
cColumn
Record
Database
cDatabase
A!FileMaker Script
cFileMakerScript
Layout
cTable
Menu Item
cMenuItem
cMenu
Document
cDocument
Window
cWindow
Application
cApplication
WMClick the names above for more detailed information about the Object Classes.
+ The containment hierarchy describes which objects are elements of other objects. For example, the diagram indicates that you could request Layout 1 of Database 1, since layouts are elements of databases. But you couldn't request Menu 1 of Database 1, since menus are not elements of databases.
Object DataB
Menus
FileMaker Pro EventstTExtensions to the standard parameters for events are denoted by their bold keywords.u
Descriptionv
User Terminologyw
Class ID & Constantx
Examplesy
Default Type{
Description|
Reply Parameters~
Event ID & Constant
Notes
Default Type
Description
Parameters
Objects and Events ListB
Menuo
FileMaker Pro Objectsp
Object Classq
Notesr
Class Reference formss
Eventst
Mod?u
Descriptionv
Elementsw
Mod?x
Default Typey
Property Descriptionz
User Terms{
Property Class}
Default Type~
Description
User Terminology
Object ID
Table of ContentsB
MenuJ
FileMaker Pro Objects & EventsK.For more information click an event or object.L
User TerminologyM
TypeN
EventO
Event SuiteP
Object Class
HelpB
MenuD
Table of ContentsE
Topic HeadingF
From BeginningGXSelect the topic of interest or click the button to the right to start at the beginning.
Descriptions and ExamplesB
This database introduces users to the support for Apple events in FileMaker Pro. It uses a variety of layouts, each intended to display a particular kind of information.
When you first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are used throughout the database to let you change the information displayed without having to return to t
he main screen. The backward and forward arrow icons shown above switch to the previous and next records, respectively. You can also use the layout pop-up menu in the status area, record book, or scripts to move through the database.
Note: Not all records in this database have data for every field. If you encounter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to see more information.
Using the
Navigation Layouts
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about support for Apple events in FileMaker Pro. Each record has an informative text field and examples, when appropriate.
FileMaker Objects Map
This layout is a navigation aid for getting to the information about a specific Event or Object. It displays all of the Events and Obj
ects that are supported in FileMaker Pro 3.0 or above, grouped according to Apple Event Suites. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Object Hierarchy
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects are contained by the objects above them. This containment is indicated by lines. Clicking on the title of an object will switch to a detailed view of that object class.
Objects and Events List
is layout provides a list view all of the Events and Objects which are supported in FileMaker Pro. It provides the same information as the FileMaker Objects Map but in a different manner. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Using the Content Layouts
Event Data
This layout gives detailed information about each Event that FileMaker Pro supports. The information supplied includes the event class, ID, terminology, and input and result p
arameters. The Examples field provides some samples for using the event using a fictitious syntax similar to the AppleScript language. The Notes field provides some additional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
Object Data
This layout gives detailed information about each Object that FileMaker Pro supports. The information supplied includes object class, ID, terminology, properties, and applicable events.
GH The Notes field provides some additional information about the object.
This Help
ScreenO
Go to
Object & Events MatrixP
Go to the Object MapQ
Go to Object HierarchyR?Click here to see full page descriptions of an Event or ObjectS'Click here to list all Events & ObjectsT.Click here to find out more about Apple EventsU
Click here to go to Main MenuV5Click here to find a specific Event, Object, or TopicW
Click here to see next recordX!Click here to see previous recordY
Menu[
Using This Database\,Use the scroll bars to see more information.
FindB
MenuW
Descriptions
and ExamplesX
Show Detail
Events & Objects MatrixB
Find Event or ObjectN
FindT
Objects`
Descriptiona
Findb
Canceld
Eventsi
Menun
Topics
What's NewB
MenuN
Events & Objects
MatrixO
FieldW
Recordc
Go Toj
Findl
Eventso
The following events do not require an Apple Events Object:
Cut, Copy, Paste, Save, Undo, Redo, Quit, Print, Begin Transaction, End Transaction
Get Data
Set Data
Print
Exists
Duplicate
Do Script
Do Menu
Delete
Data Size
Create
Count
Close
Class Info
Menu Item
Request
Layout
FileMaker Script
Database
Document
Window
Application
Objects
AX Click the Object Column or the Event Name for more information on the Object or Event.
kAEMiscStandardsZ
'misc'\
kAEBeginTransaction]
'begi'b
keyAEResultc
typeLongIntegerd
e*The transaction ID of the new transaction.
tBegins a transaction. FileMaker Pro returns the transaction ID that must be supplied with subsequent events (like End Transaction) as an event attribute. While engaged in a transaction, FileMaker Pro will not respond to events from other applications.
Client applications are strongly encouraged to minimize the amount of time they lock up a database with transactions.
Request to begin a transaction.h
Begin Transactionl
'----'
begin transaction
MenuK
What's New in FileMaker Pro 3.0
kAECoreSuiteZ
'core'\
kAEGetClassInfo]
'qobj'^
keyDirectObject_
typeTypea
The object class to query.b
keyAEResultc
typeClassInfod
The requested information.f
Returns an Apple event record of type typeClassInfo. The data in this record correspond to the information in the
resource in FileMaker Pro.gHRequests info about the properties and elements of the indicated object.h
Class Infok
'----'l
'----'
-A,class info <object class>
class info window
What can I do with it?
Use the Begin Transaction event to place FileMaker Pro in a state where it will only accept Apple event requests from the application that began the transaction or have the transaction ID that FileMaker Pro returned.
Most users will probably not need to use this feature. But in a group setting, where multiple users may have multiple transactions going simultaneously, and each one expects the database to be in a certain state, it can be a useful event.
Examples
AppleScript users:
tell application "FileMaker Pro"
set i to 1
with transaction
repeat
set cell 1 to i
set i to i + 1
end repeat
end
end tell
Note: After compiling this script, the "end" statement following "end repeat" will become "end transaction". The script will be functional in this form, but before the script will successfully recompile after any additional edits, the word "transaction" must be deleted.
For Frontier users:
with FileMaker
beginTransaction() --
returns a transaction ID
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Begin Transactiont
Begin Transactionu
Eventv
kAECoreSuiteZ
'core'\
kAEClose]
'clos'^
keyDirectObject_
typeObjectSpecifier`
The object to closef1Closes document windows, documents, and databasesg
Closes the indicated objectsh
Closek
'----'
-AMclose <object specifier>
close window 1
close database named "Sales Reports"
What can I do with it?
You can use the Close event to close windows, documents, and databases.
To use the Close event you need to provide an object specifier that refers to a window, document, or database, for example, window 1, or document "Test File".
Examples
For AppleScript users:
tell application "FileMaker Pro"
close window "Addresses"
close database "Sales Report"
close document 1
end tell
For Frontier users:
with FileMaker
close(window[2])
with FileMaker
close(window["NameOfWindow"])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
What can I do with it?
Getting the class info of an object lets the user see exactly how FileMaker Pro looks at an object
by showing what objects are elements of that object (directly beneath it in the object hierarchy), and what properties the object has.
The syntax for the Class Info event is very simple to use. All you need to provide is a class name. The class names in FileMaker Pro are Application, Window, Document, Database, FileMaker Script, Layout, Field, Record, Cell, Menu, and M
enu Item.
The list Class Info returns is geared to a technical audience. Most end-users, particularly AppleScript users, will not need to access the information contained in Class Info. For more easily understood information on Class Info data, see the description for that event in this layout.
Note: All Get commands in AppleScript are understood. Thus you could say get class info of record, or simply class info record.
Examples
For AppleScript users:
class info record
get window
class info
database class info
For Frontier users:
Before using the FileMaker table in Frontier to do a getClassInfo, you need to edit the classInfo Frontier verb so that it reads as follows:
Examples of querying the class info of an object are as follows:
with FileMaker
classInfo(application,makeWritingCode(0,0))
classInfo(document,makeWritingCode(0,0))
classInfo(window,makeWritingCode(0,0))
classInfo(menu,makeWritingCode(0,0))
classInfo(database,makeWritingCode(0,0))
classInfo(FileMakerScript,makeWritingCode(0,0))
classInfo
7(menuItem,makeWritingCode(0,0))
classInfo(record,makeWritingCode(0,0))
classInfo(layout,makeWritingCode(0,0))
classInfo(field,makeWritingCode(0,0))
classInfo(cell,makeWritingCode(0,0))
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Class Infot
Class Infou
Eventv
kAECoreSuiteZ
'core'\
kAECountElements]
'cnte'^
keyDirectObject
keyAEObjectClass_
typeObjectSpecifier
typeType`
The container object
The element class to countb
keyAEResultc
typeLongIntegerd
The number of elementsf
Counting the number of layouts returns the number of layouts in the file. Remember that the special layout, layout 0, is not counted.gMCounts the number of elements of the indicated class in the specified object.h
Countk
'----'
'kocl'l
'----'
-A_count of <container object> class <desired class>
count of database named "Sales" class layout
Closet
Closeu
Eventv
FileMaker supports many of the events and objects defined in the Core, Table, Database, and Miscellaneous suites. Use the navigator buttons to see detailed info on this support. The Apple events support of FileMaker Pro gives access to most of the features available in the Browse and Find modes. Through Apple events, you can create and delete records, change layouts, perform finds, get and set record data, and execute FileMaker scripts. There is no support for defining new fields,
h altering field definitions, creating or modifying layouts or scripts, or setting up access privileges.
FileMaker Pro only accepts Apple events from the local machine. In order to access data on a networked FileMaker database, the user must first open the database locally. The user
s access privileges will be taken into account for all Apple events.
kAECoreSuiteZ
'core'\
kAECreateElement
What can I do with it?
Use the Count event to count the items of a particular object. This is normally done by counting the object elements of another object. This event is one of the reasons why understanding the object hierarchy in FileMaker Pro, sometimes known as containment, is important.
The following are the objects the Count event can operate on:
Windows
Documents
Databases
FileMaker Scripts
Layouts (layout 0 is never counted, however)
Records
Requests
Fields
Cel
Examples
For AppleScript users:
To count: You can say:
records in a file (include found set) count of record
records in a file (ignore found set) count record of database 1
requests in a file count request
fields in a file count field
FileMaker scripts in a file count FileMaker script of window 1
cells in a file (ignore found set) count of database 1 class cell
cells in a record
count cell of record 2
For Frontier users:
To count: You can say:
with FileMaker (must be included in script)
records in a file (include found set) count(window[1],record)
records in a file (ignore found set) count(database[1],record)
fields in a file count(database[1],field)
FileMaker scripts in a file count(database[1],FileMakerSD
cript)
cells in a file (ignore found set) count(document[1],cell)
cells in a record count(record[1],cell)
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Countt
Countu
Eventv
Request
request
class
close
count
create
delete
script
duplicate
transaction
event
exists
geturl
application
documents
print
files
print
objects
Main Menu
Introduction to Apple Events
Find all Events
Find all Objects
Create Newt
Create Newu
Eventv
ectClass
keyAEPropData_
varies
typeInsertionLoc
typeType
typeAERecord
a$The initial data for the new element
The location for the new element
The element class to create
-The initial data for the element's propertiesb
keyAEResultc
typeObjectSpecifierd
e(The object specifier for the new elementfJFileMaker Pro supports creation of the cMenu, cMenuItem, and cRow classes.gDCreates a new element of the indicated class in the specified objecth
Create Newk
'data'
'insh'
'kobc'
'prdt'l
'----'
-Aucreate new <class to create> [at <insertion location>] [with data <initial data> ][with properties <property values>]
{this line creates tab delimited data }
{i.e. char(9). There are string }
{manipulation verbs in Frontier that }
{allow for more complex string }
{manipulation-see Frontier docs. }
create(record,"theData",""
,insertLoc(last,window[1])
menu create(menu,"","AName",
insertLoc(last,window[1])
menu item create(menuItem,"","AName",
insertLoc(last,window[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
h to cre
with properties "2nd Menu"
menu item create new menu item with properties
"My Menu Item"
menu item (of a menu) create new menu item at menu "1st
Menu" with properties "A Menu Item"
For Frontier users:
To create a new: You can say:
with FileMaker
record (without data) create(record,"",""
,insertLoc(last,window[1])
record (with one field of data) create(record,"data",""
,insertLoc(last,window[1])
record (with several fields of data) theData = "data1" + Char(9) + "data2"
record (without data) create new record
record (with one field of data) create new record with data "Jane"
record (with several fields of data) create new record with data {"Jane",
"Austen"}
record (in the found set) create new record
record (in the entire record set) create new record at database 1
request (without data) create new request
request (with one field of data)
create new request with data "Jane"
request (with several fields of data) create new request with data {"Jane",
"Austen"}
request (with omitted option checked) create new request with properties {omitted: true}
menu create new menu with properties
"MyMenu"
menu of a menu (a submenu) create new menu at menu "1st Menu"
ate the object. Use the "with data" option to enter data and the "with properties" option to set a property such as the "omitted" property of requests. To navigate to a created record or request, use the Go To event as in "go to (create record)".
All user-defined menus are created in the External menu, which appears when a new menu is added for the first time. Menus can be nested. See the descriptions of Menu and Menu Item for more information.
Note: FileMaker Pro can notify any applic
ation that creates a menu item in its External menu that the menu item has been selected. However, the current version of the AppleScript Script Editor cannot respond to Apple events, and so has no way to respond to menu items it creates in FileMaker Pro. Applications like HyperCard and Excel can respond to menu items they place in FileMaker Pro.
Examples
For AppleScript users:
To create a new: You can say:
What can I do with it?
Use the Create New event to create new records, requests, menus and menu items.
When creating a record or request, FileMaker Pro returns a reference to the new object in the form of an object specifier such as record ID 5 of database "Contacts" of application "FileMaker Pro".
Records can be added either to the found set or the entire set of records by specifying the document or database objects. By default, FileMaker Pro adds new records to the found set. Speci
fying the database object with the create event, however, will add the new record to the entire record set, thereby adding it "in the background" if there is a current found set. This allows for faster performance when creating records.
When creating objects, keep in mind that you have some control over where the new object is placed, and whether it has initial data or some other property. Use the "at" location parameter to specify a layout, database, document, or window in which to cre
kAECoreSuiteZ
'core'\
kAEGetDataSize]
'dsiz'^
keyDirectObject
keyAERequestedType_
typeObjectSpecifier
typeAEList`
a!The object whose data is desired.
3A list (in order of preference) of the desired typeb
keyAEResultc
typeLongIntegerd
The size of the requested data.f
Gets the size (in bytes) of data from the indicated object specifiers.
If no requested type parameter is specified, the event will return the size for the default type for the object.g0Gets the size of data from the specified object.h Data Sizek
'----'
'rtyp'l
'----'
data size [of] <object specifier> as <desired data type>
data size of name of window 1
data size of name of every field of layout 0
data size of table named "Field Sales Report" as 'TEXT'
'crel'^ keyAEData
keyAEInsertHere
keyAEObjectClass
keyAEPropData_
varies
typeInsertionLoc
typeType
typeAERecord
a$The initial data for the new element
The location for the new element
The element class to create
-The initial data for the element's propertiesb
keyAEResultc
typeObjectSpecifierd
e(The object specifier for the new elementfJFileMaker Pro supports creation of the cMenu, cMenuItem, and cRow classes.gDCreates a new element of the indicated class in the specified objecth
Create Newk
'data'
'insh'
'kobc'
'prdt'l
'----'
-Aucreate new <class to create> [at <insertion location>] [with data <initial data> ][with properties <property values>]
What can I do with it?
Use the Data Size event to retrieve the size of the data (in bytes) contained in an object. It can be a useful mechanism for getting the number of characters in a field, since there is one byte per character in a field.
Note: Data Size returns the size of the data handled by Apple events and does not always correspond to how FileMaker Pro stores the data. For example, the statement "data size of current record" returns a value such as 136 which corresponds to the nu
mber of bytes for the object reference "record id 1 of database "ABC" of application "FileMaker Pro"" not the data contained in the record.
Examples
For AppleScript users:
If you want to: You can say:
count characters in a database data size of every field of layout 0
count characters in a particular cell data size of cell "Last Name" of last record
get size of a cell as a text value data size of cell "Name"
1 of record 1 as "TEXT"
get size of a group of records data size of records 1 through 4
For Frontier users:
with FileMaker
dataSize(window[1],'****')
dataSize(cell[1],'****')
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
s Data Sizet
Data Sizeu
Eventv
kAECoreSuiteZ
'core'\ kAEDelete]
'delo'^
keyDirectObject_
typeObjectSpecifier`
The objects to be deleted.f
FileMaker Pro supports deletion of the cMenu, cMenuItem, and cRow classes.
Note: If the user does not have privileges to delete records, the error result, errAEBadPassword ('xxxx') will be returned.g
Deletes the specified objecth
Deletek
'----'
-A-delete <object specifier>
delete last record
What can I do with it?
Use the Delete event to delete records, requests, menus, and menu items.
Note:
- The only menus and menu items that can be deleted are those in the External menu.
- When deleting all requests, there is a null request (request 0) until a request is created or the database is switched to another mode at which time an initial blank request is created (request 1).
Examples
For AppleScript users:
To delete :
You can say:
first record (include found set) delete record 1
last record (include found set) delete last record
delete all records in found set delete every record
delete all records in database delete every record of database 1
delete all requests delete every request
first menu item in the "External" menu delete menu item 1 of menu "External"
a menu item named "a menu item" delete menu item "a menu
item" of menu
"External"
second menu in the "External" menu delete menu 2 of menu "External"
every record that matches the condition delete every record whose cell 1 = "x"
(Other operators that can be used for "whose" clauses: <,
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Deletet
Deleteu
Eventv
kAEMiscStandardsZ
'misc'\ kAEDoMenu]
'menu'^
keyDirectObject_
typeObjectSpecifier`
The menu item to be performed.f.Performs the indicated menu if it is enabled.
g*Do the action associated with a menu item.h
Do Menuk
'----'
-Axdo menu <object specifier>
do menu menu item named "Omit" of menu "Select"
do menu menu item 1 of menu named "External"
What can I do with it?
Use the Do Menu event to trigger a command from a FileMaker Pro menu.
Keep the following in mind when working with menus:
It is possible to access nested menus, by specifying the nesting (see below).
Menu items referred to by name must exactly match the way they appear in FileMaker Pro. Where ellipses appear, use the option-semicolon character to generate the ellipse.
You must include the menu when referring to a menu item (for example, do menu menu item
"New Record" of menu "Edit").
Certain menu items are not available in both Browse and Find modes, or cannot be resolved by an Apple event, for example, Access Privileges.
Finally, FileMaker Pro may ignore some events for security reasons. For example, you cannot delete a record or a found set using Apple events. This protects the user from accidentally deleting records. If you want to delete a record, you must use the Delete event.
Examples
For AppleScript users:
If you want to acce
ss a: You can say:
user-defined menu do menu menu item "MyMenuItem" of menu "External"
FileMaker menu item do menu menu item "Relookup" of menu "Edit"
menu item of a submenu do menu menu item "Bold" of menu "Style" of menu "Format"
menu item (omit) by index do menu menu item 8 of menu 4
For Frontier users:
Before continuing edit the doMenu entry of the FileMaker table so that it reads as follows:
Additionally, you need to add the following string4 constants to the FileMaker table:
'cmnu' for menus
'cmen' for menu items
If you want to: You can say:
with FileMaker
access a user-defined menu doMenu(menu["External"].menuItem["MyMenuItem"])
acces
}s a FileMaker menu item doMenu(menu["Edit"].menuItem["Relookup"])
access a menu item of a submenu doMenu(menu["Format"].menu["Style"].menuItem
["Bold"])
access a menu item (omit) by index doMenu(menu[4].[8])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Do Menut
Do Menuu
Eventv
kAEMiscStandardsZ
'misc'\
kAEDoScript]
'dosc'^
keyDirectObject_
typeObjectSpecifier`
The script to be performedf,Performs the indicated FileMaker Pro script.g
Perform a FileMaker Pro script.h Do Scriptk
'----'
-AMdo script <object specifier>
do script FileMaker script named "Print Report"
What can I do with it?
Use the Do Script event to trigger a script in the FileMaker Pro Scripts menu.
To use the Do Script event you need to provide an object specifier for a script, like FileMaker script 1, or last FileMaker script, or FileMaker script "Print Sales Report". (You must always refer to a script object as FileMaker script <x>; the word "FileMaker" is part of the name of the object.)
You may find it useful to write a script that restores complex finds, sorts, import orders,
and page setups, and then call the script to do the work for you, particularly if printing is involved. FileMaker Pro scripts have the ability to restore page setups, print without a dialog, and so forth, which are features not available to Apple events.
Note: the Do Script event is successfully completed when the FileMaker Pro script begins. Because FileMaker Pro is unable to process Apple events while a ScriptMaker script is running, it is possible to receive a timeout error when sendin
g events to FileMaker Pro after sending a Do Script event. Here are some suggestions to help avoid timeouts:
1) lengthen the timeout period using a statement such as with timeout of 600 seconds
2) implement a flow control mechanism by using ScriptMaker to send an event to the applet to continue with the next Apple event to FileMaker Pro.
3) use a routine to continuously send events to FileMaker Pro and continue only when FileMaker Pro is ready. Call the WaitUntilReady routine after send
ing the Do Script event and before sending another event to FileMaker Pro. Here is an example of such a routine:
on WaitUntilReady()
with timeout of 5 seconds
repeat
try
tell application "FileMaker Pro" to get version
return
on error number errnum
end try
end repeat
end timeout
end WaitUntilReady
Examples
For AppleScript users:
If you want to perform: You can say:
the first
script do script FileMaker script 1
the last script do script last FileMaker script
a script by its name do script FileMaker script "Print Sales Report"
all scripts meeting a test do script every FileMaker script whose name = "aName"
For Frontier users:
If you want to perform: You can say:
with FileMaker
the first script doScrip
t(FileMakerScript[1])
the second script doScript(FileMakerScript[2])
a script by its name doScript(FileMakerScript["x"])
the second script doScript(FileMakerScript[1].FileMakerScript['next'])
the second script doScript(FileMakerScript[3].FileMakerScript['prev'])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
s Do Scriptt
Do Scriptu
Eventv
kAECoreSuiteZ
'core'\
kAEClone]
'clon'^
keyDirectObject
keyAEInsertHere_
typeObjectSpecifier
typeInsertionLoc`
The object to duplicate
Where to place the duplicateb
keyAEResultc
typeObjectSpecifierd
e(The object specifiers of the new objectsf
FileMaker Pro only supports this event for the cMenu, cMenuItem, and cRow object classes. The only valid insertion location is "at the end of existing items."
Duplicating a record (cRow) is equivalent to choosing the "Duplicate Record" menu item.
g$Makes a copy of the indicated objecth Duplicatek
'----'
'inshl
'----'
-AHduplicate <object specifier> to <insertion location>
duplicate record 5
What can I do with it?
Use the Duplicate event to duplicate records, requests, menus, and menu items in an open file.
When duplicating a record or request, FileMaker Pro returns a reference to the new object in the form of an object specifier such as record ID 5 of database "Contacts" of application "FileMaker Pro".
Duplicated records can be added either to the found set or the entire set of records by specifying the document or database objects. By default, FileMaker Pro adds new rec
ords to the found set. Specifying the database object with the duplicate event, however, will add the new record to the entire record set, thereby adding it "in the background" if there is a current found set. This results in faster performance when duplicating records.
When duplicating objects, keep in mind that you have some control over where the new object is placed. Use the "to" location parameter to specify a layout, database, document, or window in which to duplicate the object.
To navigate to a duplicated record or request, use the Go To event as in go to (duplicate record 1).
Examples
For AppleScript users:
tell application "FileMaker Pro"
duplicate record 2
duplicate record 2 of window "NameOfWindow"
duplicate record 1 to database 1
duplicate record 2 to document 1
duplicate request 1
duplicate menu item "Reports" to menu item "Business Plan"
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
s Duplicatet
Duplicateu
Eventv
kAEMiscStandardsZ
'misc'\
kAEEndTransaction]
'endt'fZEnds the indicated transaction, allowing other applications to manipulate the database.
Request to end a transactionh
End Transaction
end transaction
What can I do with it?
Use the End Transaction event to conclude a transaction that was begun with the Begin (or With) Transaction statement.
Most users will probably not need to use this feature. But in a group setting, where multiple users may have multiple transactions going simultaneously, and each one expects the database to be in a certain state, it can be a useful event.
In order to end a transaction, the transaction ID of that transaction must be provided as an attribute of the
End Transaction event, not as a parameter. When a transaction is ended, FileMaker Pro allows other applications to manipulate the database, processing Apple events in the order in which they are received.
Examples
For AppleScript users:
tell application "FileMaker Pro"
set i to 1
with transaction
repeat
set cell 1 to i
set i to i + 1
end repeat
end
end tell
Note: After compiling this script, the "end" statement following "end repeat" will become "end transaction". The scri
pt will be functional in this form, but before the script will successfully recompile after any additional edits, the word "transaction" must be deleted.
For Frontier users:
with FileMaker
endTransaction(transactionID)
Note: You will need Frontier 2.1 or later to use this functionality.
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
End Transactiont
End Transactionu
Eventv
kAECoreSuiteZ
'core'\
kAEGetEventInfo]
'gtei'^
keyDirectObject_
typeType`
a&The event class (suite) which to queryb
keyAEResultc
typeEventInfod
The requested informationf
Returns an Apple event record of type typeEventInfo. The data in this record correspond to the information in the 'aete' resource of FileMaker Pro.g*Requests info about the events in a suite.h
Event Infok
'----'l
'----'
-A=event info <event class>
event info "core"
event info "FMPR"
What can I do with it?
Use the Event Info event to retrieve a list of events belonging to the specified class, with detailed information about the events, including parameters, reply parameters, IDs, and so forth.
The syntax for the Event Info event is very simple to use. All you need to provide is a class name. FileMaker has six classes of events: Core, Miscellaneous, Required, Database, FileMaker Pro, and URL. They are abbreviated as core, misc, aevt, DATA, FMPR, and GURL respectively,
for use with FileMaker Pro.
The list Event Info returns is geared to a technical audience. Most end-users, particularly AppleScript users, will not need to access the information contained in Event Info.
Examples
For AppleScript users:
To get information about: You can say:
core suite events event info "core"
miscellaneous suite events event info "misc"
required suite events event info "aev
database suite events event info "DATA"
FileMaker Pro suite events event info "FMPR"
URL suite events event info "GURL"
For Frontier users:
Before using the FileMaker table in Userland Frontier to do a getEventInfo, edit the eventInfo Frontier verb so that it reads as follows.
eventInfo('core',makeWritingCode(0,0)) -- returns information about the
core suite events supported by
FileMaker Pro
eventInfo('misc',makeWritingCode(0,0)) -- returns information about the
miscellaneous suite events
supported by FileMaker Pro
eventInfo('aevt',makeWritingCode(0,0)) -- returns information about the
required suite events
supported by FileMaker Pro
eventInfo('DATA',makeWritingCode(0,0)) -- returns information about the
database suite events
supported by FileMaker Pro
eventInfo('FMPR',makeWritingCode(0,0)) -- returns information about the
FileMaker Pro suite events
{ supported by FileMaker Pro
eventInfo('GURL',makeWritingCode(0,0)) -- returns information about the
URL suite events
supported by FileMaker Pro
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Event Infot
Event Infou
Eventv
kAECoreSuiteZ
'core'\
kAEDoObjectsExist]
'doex'^
keyDirectObject_
typeObjectSpecifier`
The objects to be foundb
keyAEResultc
typeBooleand
TRUE if the object exists
Returns true if the indicated object exists, false otherwise.
Note: This event is not intended to locate null or empty values. In other words, "name of record 1" will return true because records do have the name property, even though all records have empty values for their names.
Asks if a given object existsh
Existsk
'----'l
'----'
-A9<object specifier> exists
layout 0 exists
field 2 exists
What can I do with it?
Use the Exists event to make sure the objects you want to work with are in fact available to you. The Exists event works with all FileMaker Pro objects.
Exists won't locate empty values. For example, "name of record 1 exists" returns true, since the property exists, even though the name is blank (because FileMaker Pro records do not have names).
Examples
For AppleScript users:
Filemaker script "Go to Help" exists
record 100 exists
exists window 1
tell applicat
Gion "FileMaker Pro"
if exists window "Contacts" = false then
open file "Contacts"
end if
end tell
For Frontier users:
with FileMaker
exists(record[1])
exists(FileMakerScript[1])
exists(window[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Existst
Existsu
Eventv
kAEFileMakerZ
'FMPR'\
kAEFind]
'FIND'^
keyDirectObject_
typeObjectSpecifiera.The window in which to find a group of recordsf
The Find event finds a group of records specified in the current set of find requests. You can specify search criteria using the Create or Set Data events with the Request object.g>Perform a FileMaker Pro find using the current set of requestsh
Findk
'----'
-ADfind <window object specifier>
find window 1
find window "Contacts"
What can I do with it?
Use the Find event to perform the current set of find requests for a database. To use the Find event simply specify the window to perform the find requests. If no window is specified, the Find event will work with the frontmost database. Find requests can be created with the Create event and edited with the Set Data event.
Examples
For AppleScript users:
tell application "FileMaker Pro"
delete every request
create request 1
set cell "State" of requestB
1 to "CA"
find
end tell
For Frontier users:
with FileMaker
find(window[1])
find(window["Contacts"])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Findt
Findu
Eventv
kAECoreSuiteZ
'core'
kAEGetData]
'getd'^
keyDirectObject
keyAERequestedType_
typeObjectSpecifier
typeAEList`
a#The object(s) whose data is desired
3A list (in order of preference) of the desired typeb
keyAEResultc
typeAEListd
The requested data
Gets the data from the indicated object specifiers.
If no requested type parameter is specified, the event will return the data as the default type for the object.
Note: The user must have read access in order to get the data for layouts, records, fields, and cells.
g$Gets data from the specified object.h
Get Datak
'----'
'rtyp'l
'----'
get data [of] <object specifier> as <desired data type>
get dataof name of window 1
get data of name of every field of layout 0
get data of layout named "Field Sales Report"
What can I do with it?
Use the Get Data event to retrieve data from an object, like a cell. You can also request the data that is returned to be of a certain type, such as text, number, integer, or list. The default result type for objects with multiple elements is list (eg. getting data from a field when there are multiple records). The result type for an object that returns a single value is text (eg. a single record with one field).
The Get Data event can be used to get data types suc
h as pictures and sounds from FileMaker Pro container fields. When a picture has been imported into a container field using the "store a file reference" option, a file reference to the picture file will be returned. FileMaker Pro also allows you to set a file reference into a container field via Apple events.
Note: You must have read access in order to get the data for layouts, records, fields, and cells. Also, the word 'get' in AppleScript is always understood. Thus you could say get d
ata record 1, or simply record 1.
Examples
For AppleScript users:
If you want to get data from: You can say:
all fields from the local file every field of layout 0
all fields from the local file as text every field of layout 0 as text
a field on the last record cell "Last Name" of last record
cell "Salary" of the first record cell "Salary"
a range of records
records 1 through 4 as text
record based on relative position record after record 1
record based on relative position record before record 3
the first record first record
the last record last record
the middle record middle record
a random record some record
records matching certain criteria every record whose cell 1 = "findMe"
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Get Datat
Get Datau
Eventv
kAEURLZ
'GURL'\ kAEGetURL]
'GURL'^
keyDirectObject_
typeChar`
a5The URL specification for the FileMaker Pro database.
Send this event from an Internet helper application to FileMaker Pro. Databases hosted with TCP/IP can be specified using any of the following formats:
"FMP3://[hostname]/filename"
"<FMP3://[hostname]/filename>"
"URL:FMP3://[hostname]/filename"
"<URL:FMP3://[hostname]/filename>"
Before sending the GetURL event, make sure to register FileMaker Pro with the application using the syntax
tell application "Netscape"
register protocol "FMP3" for protocol "FMP3"
end tell
g7Open a FileMaker Pro database using a URL specificationh
Use the GetURL event to open a FileMaker Pro database over the Internet using a Web-browser application such as Netscape
. The GetURL event from the URL suite allows Internet helper applications to open files specified with the Universal Resource Locator (URL) syntax.
To use the GetURL event, first make sure to register FileMaker Pro as a protocol with the helper application using the following syntax. Note that you only need to register the application once.
application "Netscape"
register protocol "FMP3" for protocol "FMP3"
end tell
Next send the GetURL event from the Internet helper application to FileMaker Pro. The GetURL event accepts a string representing a URL for a FileMaker Pro database that has been hosted with TCP/IP. To enable TCP/IP networking, set the general preference for the TCP/IP protocol on both the guest and host.
Databases can be specified using any of the following forms, where hostname is the IP address or domain
name of the machine hosting the FileMaker Pro database and filename is the name of the database:
"FMP3://[hostname]/filename"
"<FMP3://[hostname]/filename>"
"URL:FMP3://[hostname]/filename"
"<URL:FMP3://[hostname]/filename>"
If the hostname is empty or specified with an asterisk (*), FileMaker Pro will search the local zone for the file.
Examples
For AppleScript users:
tell application "FileMaker Pro"
getURL "FMP3://claris.com/Product Catalog.FP3"
getURL "FMP3://1
99.99.99.99/Product Catalog.FP3"
end tell
For Netscape users:
Create an HTML document with the following syntax:
<A HREF="FMP3://claris.com/Product Catalog.FP3"> Click here to open the Products Catalog database</A>
Note that the file "Product Catalog.FP3", the address 199.99.99.99, and the domain name claris.com are merely examples. Replace the file name with the name of the database you wish to access and make sure the IP address or domain name refers to the machine hosting the databaE
GetURLt
GetURLu
Eventv
kAEFileMakerZ
'FMPR'\
kAEGoto]
'GOTO'^
keyDirectObject_
typeObjectSpecifier`
The object to navigate to
-FileMaker Pro supports navigation of records, requests, cells, layouts, windows, databases, and documents.
Performing a Go To event while a database is in Preview mode or Layout mode will switch the database to Browse mode. Using the Go To event with a request will switch the database to Find mode.
Navigates to an objecth
Go Tok
'----'
go to <object specifier>
go to layout "Data Entry"
go to last record
go to cell 1 of record 5
go to record after (current record)
What can I do with it?
The Go To event allows you to navigate to FileMaker Pro objects such as databases, layouts, records, and cells. For instance, the Go To event can be used to tab into a field.
The Go To event will work on the following objects: Window, Document, Database, Layout, Record, Request, and Cell. The object must already be open or available; so it may be necessary to open a window, document or database before navigating to something within it.
The Go To event can be use
d to copy and paste the contents of a field. When copying or cutting from fields it is first necessary to have something selected. This can be accomplished with the Do Menu event (for example do menu menu item "Select All" of menu "Edit"). Note that it is not necessary to perform a Select All for container fields - merely going to the field will select it.
Also note that when transferring information between applications via the clipboard, the Macintosh Operating System requires that y
ou activate the source and target applications. This can be done in AppleScript using the "activate" command directed at the application before performing a cut, copy, or paste.
Note:
- Performing a Go To event while a database is in Preview mode or Layout mode will switch the database to Browse mode. Using the Go To event with a request will switch the database to Find mode.
- FileMaker Pro does not support navigation to rows within portals or repetitions within repeating fields other
than the first row or repetition.
Examples
For AppleScript users:
If you want to: You can say:
move to the first record go to record 1
create and select a record go to (create record)
go to the next record go to record after current record
go to the previous record go to record before current record
switch to another open window go to window 2
display a different layout go to
layout "Sales Summary"
go to the next layout go to layout after current layout
go to the previous layout go to layout before current layout
tab into a field go to cell 1 of record 1
display a find request go to request 5
The following example copies a picture from a field on one record and pastes it into a field on another record.
tell application "FileMaker Pro"
activate
go to cell "Contact Name" of record 1
do menu menu item "Select
All" of menu "Edit"
copy
go to cell "Contact Name" of record 2
paste
For Frontier users:
If you want to: You can say:
with FileMaker
display the first record go to(record[1])
display a different layout go to(Layout[2])
move to the first record go to(record[1])
switch to another open window go to(window[2])
displ
Uay a different layout go to(layout["Sales Summary"])
tab into a field go to(record[1].cell[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Go Tot
Go Tou
Eventv
kAECoreSuiteZ
'core'\
kAEOpen]
'odoc'^
keyDirectObject
keyAEPassword_
typeObjectSpecifier
typeChar`
The object to be opened.
A password for the file.g
Opens the indicated objects.h
Openk
'----'
'pPAS'
-A5open <alias>
open <alias> with password "thePassword"
What can I do with it?
Use the Open event to open databases or documents.
The syntax for the Open event is very simple to use. All you need to provide is an alias, like "Macintosh HD:Addresses".
You can open files that require passwords by including a password as a parameter to the Open event. You can even open more than one password protected file at a time by providing a list of passwords with your list of files. If all files have the same password, you can include that one password,
and FileMaker Pro will use it when opening each of the files you specify. You can also open files with a blank password by specifying an empty string. If a database has a blank password using the Open event will automatically use that password when opening unless a specific password is supplied.
There are some technical differences between the Open Document event and the Open event. See the FileMaker Objects layout for further information.
Note: Use the Open File syntax from AppleScri
pt when attempting to open a single file. When opening multiple files, use the simple Open event. See examples in the AppleScript users section below.
Examples
For AppleScript users:
If you want to: You can say:
open a single file open file "Hard Disk:Databases:Addresses"
open a file with a password open file "Batters" with password "admin"
open multiple files with same password open
{"Batters", "Pitchers"} with password
{"admin"}
open multiple files with different passwords open {"Batters", "Pitchers"} with
password {"admin", "guest"}
open a file with a blank password open file "Compact Discs" with password ""
For Frontier users:
with FileMaker
openDocument("alias")
To open a password protected database using Frontier add the following script to the FileMaker t
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Opent
Openu
Eventv
kAERequiredSuiteZ
'aevt'\
kAEOpenApplication]
'oapp'fyInside Macintosh Volume VI states that only Finder should send this event. FileMaker Pro will not listen to anyone else.gYPerforms startup operations for FileMaker Pro. Note: Only Finder should send this event.h
Open Application
open application
What can I do with it?
Use the Open Application event to launch FileMaker Pro from the Finder. It also tells the Finder to launch other applications that support the Open Application event.
Since the Finder is the only application that is supposed to launch other applications, FileMaker Pro will only respond to this event when it is sent from the Finder. If you wish to have FileMaker Pro open other applications you should use the launch application syntax instead of open application. Se
e examples below in the AppleScript users section.
Most AppleScript and Frontier users will not need to use this event.
To use Open Application you need to provide an object specifier, like "HD:Applications Folder:MacWrite Pro".
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Open Documentst
Open Documentsu
Eventv
kAERequiredSuiteZ
'aevt'\
kAEPrintDocuments]
'pdoc'^
keyDirectObject_ typeAlias`
a$The alias of the file to be printed.f,Prints the indicated FileMaker Pro document.g
Prints the indicated files.h
Print (files)k
'----'
-A=print alias <file alias>
print alias "Macintosh HD:Batters"
What can I do with it?
Use the Print event to print files, just as if you had selected the Print command from the File menu.
You can use the Print event to print files that are not already open. However, the files will be closed once the Print event is completed. Files that were already open when the Print event was sent will remain open.
This Print event is part of the Required Suite, and is an extension of the Print event found in the Core suite.
The following are the objects the Pr
int event will work with:
Windows
Documents
Databases
To use the Print event you must provide an alias to the object to be printed. An alias is much like an object specifier, for example "HD:Documents:Sales Report".
Note: It's best not to use the Print event when a FileMaker Pro script can be created and called, since the print dialog cannot be suppressed when the Print event is used. In addition, using a FileMaker Pro script will allow the file to remain open if required.
Example
For AppleScript users:
tell application "FileMaker Pro"
print alias "Macintosh HD:Batters"
end tell
For Frontier users:
with FileMaker
printDocument("alias")
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Print (files)t
Print (files)u
Eventv
kAECoreSuiteZ
'core'\
kAEPrint]
'pdoc'^
keyDirectObject_
typeObjectSpecifier`
The object to be printed.g
Prints the indicated objects.h
Print (objects)k
'----'
print <object specifier>
What can I do with it?
Use the Print event to print a FileMaker Pro file.
The syntax for the Print event is very simple to use. All you need to do is provide an alias. Print is equivalent to doing a print from Finder so the file will be closed after the print has completed.
Here are some alternatives to using the Print event:
Create a ScriptMaker script in the relevant database and use Apple events to send a Do Script to perform this script.
Send a Do Menu event to FileMaker
Pro; for example, do menu menu item "print
" of menu "file".
Use the Print event from the Required Suite, using an Apple events alias. See the record for the Print event from the Required Suite.
Examples
For AppleScript users:
tell application "FileMaker Pro"
print "Macintosh HD:Batters"
end tell
For Frontier users:
with FileMaker
printDocument("alias")
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Print (objects)t
Print (objects)u
Eventv
kAERequiredSuiteZ
'aevt'\
kAEQuitApplication]
'quit'f
Quits FileMaker Prog
Quits FileMaker Proh
-A.quit
tell application "FileMaker Pro" to quit
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are used throughout the database to let you change the information displayed wi
thout having to return to the main screen. The forward and backward arrow icons above switch to the next and previous records, respectively. You can also use the layout pop-up menu in the status area, record book or scripts to move through the database.
Note: not all records in this database have data for every field. If you encounter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to continu
e with more information.
Using the Navigation Layouts
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about support for Apple events in FileMaker Pro. Each record has an informative text field as well as an (optional) example.
FileMaker Objects Map
This layout is a navigation aid for getting to the information about a
specific Event or Object. It displays all of the Events and Objects which are supported in FileMaker Pro 2.0, grouped according to Apple Event Suites. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Object Hierarchy
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects appearing to the right are contained in objects to the right of them. This containment is indicated by dotted gray lines. Clicki
ng on the title of an Object will switch to a detailed view of that class.
Objects and Events List
This layout provides a list view all of the Events and Objects which are supported in FileMaker Pro 2.0. It provides the same infomation as the
FileMaker Objects Map
in a different manner. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Using the Content Layouts
FileMaker Events
This layout gives detailed information about
each Event which FileMaker Pro 2.0 supports. The information supplied includes the event class, ID, terminology, and input and result parameters. The
Examples
field provides some samples for using the event using a fictitious syntax similar to the HyperTalk language. The
Notes
field provides some additional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
What can I do with it?
The Quit event tells the FileMaker Pro application to quit, just as if you had pulled down the File menu, and selected the Quit command. You can use the Quit event to return to the Finder, for example, if a series of scripts has finished running, and you wish to present a clean desktop.
Simply sending a Quit event to FileMaker Pro will quit FileMaker Pro. No other information is needed.
Examples
For AppleScript users:
tell application "FileMaker Pro"
quit
nd tell
For Frontier users:
with FileMaker
QuitApplication()
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Quitt
Quitu
Eventv
kAECoreSuiteZ
'core'\
kAESave]
'save'
keyDirectObject_
typeObjectSpecifier`
The object to be savedg
Saves the indicated objects.h
Savek
'----'
save <object specifier>
What can I do with it?
Use the Save event to save a FileMaker Pro file. This isn
t normally necessary as FileMaker Pro automatically saves files. The Save event can be used to exit a record or request, thereby leaving no field active and updating data in the record.
Because FileMaker Pro saves automatically every few seconds, you would not normally need to use this event. However, it is possible to configure FileMaker Pro to save less frequently (to save power on a battery-operated not
ebook computer, for example). Therefore, it may make sense to request FileMaker Pro to write its changes out to disk periodically.
Use the Save event when accessing data that may not yet be saved to disk. For example, use Save before getting or setting data into a field when data has been typed into a field and the cursor is still active. Another case where Save can be helpful is setting data into a field and getting the choices of the field when the value list is based on the field's co
^ntents.
Examples
For AppleScript users:
tell application "FileMaker Pro"
set cell "Shirt Size" of record 5 to "XL"
save database 1
get choices of cell "Shirt Size"
end tell
For Frontier users:
with FileMaker
save(window[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Savet
Saveu
Eventv
cApplicationI
'capp'J
ApplicationK
A Macintosh application.L
typeObjectSpecifierM pBestType
pClass
pDefaultType
pName
pIsFrontProcess
pVersionN
'pbst'
'pcls'
'deft'
'pnam'
'pisf'
'vers'O best type
class
default type
frontmost
versionP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
Name of the application
-TRUE if the application is the front-most app
!Version number of the applicationQ
cType
cType
cType
cChar
cBoolean
cVersionS cDocument
cWindow
cMenuT
The currently open documents
The open document windows
All installed menus
absolute positionW
Count
Class Info
Data Size
Exist
Get Data
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are used throughout the database to let you change the information displayed wi
thout having to return to the main screen. The forward and backward arrow icons above switch to the next and previous records, respectively. You can also use the layout pop-up menu in the status area, record book or scripts to move through the database.
Note: not all records in this database have data for every field. If you encounter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to continu
e with more information.
Using the Navigation Layouts
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about support for Apple events in FileMaker Pro. Each record has an informative text field as well as an (optional) example.
FileMaker Objects Map
This layout is a navigation aid for getting to the information about a
specific Event or Object. It displays all of the Events and Objects which are supported in FileMaker Pro 2.0, grouped according to Apple Event Suites. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Object Hierarchy
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects appearing to the right are contained in objects to the right of them. This containment is indicated by dotted gray lines. Clicki
ng on the title of an Object will switch to a detailed view of that class.
Objects and Events List
This layout provides a list view all of the Events and Objects which are supported in FileMaker Pro 2.0. It provides the same infomation as the
FileMaker Objects Map
in a different manner. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Using the Content Layouts
FileMaker Events
This layout gives detailed information about
each Event which FileMaker Pro 2.0 supports. The information supplied includes the event class, ID, terminology, and input and result parameters. The
Examples
field provides some samples for using the event using a fictitious syntax similar to the HyperTalk language. The
Notes
field provides some additional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
What can I do with it?
The Application object is not one that is normally operated on by users, except when initiating a series of commands. For example, in AppleScript, you could say:
tell application "FileMaker Pro"
create new record with data {"Sue", "Smith"}
end tell
The above syntax channels the statements to the FileMaker Pro application.
The following are some Apple events that commonly apply to the Application, with some sample AppleScript syntax:
If you want to:
You can say:
see if FileMaker is running exists application "FileMaker Pro"
get class info about the application class info of application
quit FileMaker Pro quit
What properties does it have?
The Application object has the following properties, or attributes:
Best Type. The Best Type of the Application object is 'obj ', meaning object.
Class. The C
lass of the Application object is 'capp'.
Default Type. The Default Type of the Application object is 'obj ', the same as Best Type.
Frontmost. Frontmost is a Boolean value that indicates whether or not the Application is the frontmost process or not.
Name. Returns the name of the Application as it appears to the Finder. This is the name that should be used in a Tell statement from AppleScript.
Version. Returns the application version stored in the 'vers' resource - eg. "3.0v1".
Example
For AppleScript users:
The main use AppleScript users will have for the Application object is the Tell statement. For example:
tell application "FileMaker Pro"
<statements here>
end tell
The following script shows how each of the Application properties can be accessed or used.
copy name of application "FileMaker Pro" to appName
copy version of application "FileMaker Pro" to appVersion
copy best type of application "FileMaker Pro" to appBestType
if frontmost of application "
FileMaker Pro" is true then beep 5
copy default type of application "FileMaker Pro" to appDefaultType
copy class of application "FileMaker Pro" to appClass
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query application properties you can use the following:
with FileMaker
g
etProperty('pbst',application[1]) -- best type of FileMaker Pro
getProperty('pcls',application[1]) -- class of FileMaker Pro
getProperty('deft',application[1]) -- default type of FileMaker Pro
getProperty('pisf',application[1]) -- frontmost of FileMaker Pro
getProperty('pnam',application[1]) -- name of FileMaker Pro
getProperty('vers',application[1]) -- version of FileMaker Pro
with FileMaker
count(application[1]
,application) -- returns 1
exists(application[1]) -- returns true
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Applicationt
Application
cApplication
Objectv
cCellI
'ccel'J
CellK-The value of a field for a particular record.L
typeCharM pBestType
pClass
pDefaultType
pName
pValue
pFormula
pProtection
pLock
pRepeatSize
pChoices
pGlobalValueN
'pbst'
'pcls'
'deft'
'ID '
'pnam'
'vlue'
'pfor'
'ppro'
'pLCK'
'pRPS'
'pCHS'
'pGLL'O best type
class
default type
cellValue
formula
protection
repeat size
choices
globalValueP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The unique ID of the cell
)The name of the field that makes the cell
The contents of the cell
$The calculation formula for the cell
The protection on the cell
The locking status on the cell
/The number of repetitions defined for this cell
%The value list associated with a cell
Is this cell a global cell?Q
cType
cType
cType
cLongInteger
cChar
cChar
cChar
cEnumeration
cEnumeration
cLongInteger
cChar
cBoolean
<none>V6name
range
absolute position
relative position
Class Info
Count
Data Size
Duplicate
Exist
Get Data
Go To
Set Data
What can I do with it?
A Cell is the intersection of a record and a field; it is the value of a particular field for a particular record. Use the Cell object to obtain or examine data.
Related cells can be accessed via Apple events. The name of a related cell includes the relationship name separated by two colons such as "Contacts::First Name". Similarly, the ID of a related cell includes an identifier for the relationship. To access a related cell it must exist on a layout in the maste
r file. Layout 0 includes all cells specified in the local database (ie. related cells cannot be accessed from this layout).
The following are some Apple events that commonly apply to cells, with sample AppleScript syntax:
If you want to: You can say:
Copy a cell value to a variable copy cell 1 to aVariable
Count the number of cells in a database count cells of database 1
See if
a cell exists exists cell 5
Get Class Info of a cell class info cell
Get data from a cell get data cell 1, or simply, cell 1
Get data size of a cell data size cell 1
Find records based on cell values show (Records whose cell "Name" is "Jones")
Set data in a cell set cell 1 to "Jane"
What properties does it have?
Best Type. The Best Type of the Cell object is 'ccel'.
Class. The Clas
s of the Cell object is 'ccel'.
Default Type. The Default Type is 'TEXT' for text fields, 'doub' for number fields, 'PICT' for container fields, and 'ldt ' for time and date fields.
Name. Returns the field name of the cell as it appears in the Define Fields dialog. If a cell is related, the name of the cell includes the name of the related file separated by two colons such as "Contacts::First Name".
ID. The cell ID property is a unique and persistent identifier for a cell represented by
a list containing the ID of the record and the ID of the field (eg. {1,2}). When a cell is related, the ID takes the form of {record ID, {relationship ID, field ID}} where the record ID is from the master file and the field ID is from the related file. For example, the cell ID {1, {2, 3} is the unique identifier for a related cell of the record in the local database whose ID is 1, using the field of the related database whose ID is 3 as defined by the relationship whose ID is 2.
CellValu
e. The CellValue property returns the contents of a cell.
Access. The Access property returns the access privileges of the cell, which may be one or more of the following: No Access, Read, Write, Update, Create, No Delete, Delete, Full.
Protection. The protection property returns the protected status of the cell, which is one or more of the following: Read Only, Formulas Protected, Read, Write.
Formula. The Formula property returns the cell's calculation formula. This property will be empt
y ("") for fields that are not defined as calculation fields.
Lock. The lock property returns the lock status of the cell, which is one of the following: Unlocked, Shared Lock, Exclusive Lock.
Repeat Size. Repeat Size returns a number indicating the number of repetitions a cell has been formatted to display. Non-repeating fields have a value of 1; repeating fields return the size defined for the field on the specified layout. Specifying the repeat size for a cell using layout 0 returns th
e maximum number of repeats defined in the Define Fields dialog.
Choices. The Choices property contains the value list associated with the cell on a specific layout.
GlobalValue. The GlobalValue property is a Boolean property that returns true if the cell has been defined in the Define fields dialog to be a global field.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
cell 1
end tell
This command gets all the data in the first cell of the topmost database. To g
et properties of a cell using AppleScript
tell application "FileMaker Pro"
best type of cell 1
default type of cell 1
class of cell 1
cellvalue of cell 1
name of cell 1
formula of cell 1
ID of cell 1
lock of cell 1
protection of cell 1
repeat size of cell 1
best type of cell 1
choices of cell 1
globalValue of cell 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the
FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query cell properties you can use the following:
with FileMaker
getProperty('pbst',cell[1])) -- best type of cells
getProperty('deft',cell[1])) -- default type of cells
getProperty('pcls',cell[1])) -- class type of cells
getProperty('vlue',cell[1])) -- contents of the specified cell
g
etProperty('pnam',cell[1])) -- name of the specified cell
getProperty('pfor',cell[1])) -- calculation formula for the cell
getProperty('ID ',cell[1])) -- unique ID for the cell
getProperty('pLCK',cell[1])) -- lock for the cell
getProperty('ppro',cell[1])) -- protection for the cell
getProperty('pRPS',cell[1])) -- number of repetitions for the cell
getProperty('pCHS',field[1]) -- value list associated with the cell
To get data from a cell using Frontier you could say the following
with FileMaker
get(Application[1].document[1].record[1].cell[1]) -- cell 1 of record 1
get(record[1].cell[1]) -- cell 1 of record 1
get(cell[10]) -- 10th cell of all the
cells in the found set
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in M
the Frontier.root.
Cellt
cCell
Objectv
3H cDatabaseI
'cDB 'J
DatabaseK
A FileMaker Pro databaseL
typeObjectSpecifier M pBestType
pClass
pDefaultType
pName
pAccess
pLock
pCurrentLayout
pCurrentRecord
'pbst'
'pcls'
'deft'
'pnam'
'pACS'
'pLCK'
'pCLY'
'pCRW'O best type
class
default type
access
current layout
current recordP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The name of the database
*The access privileges for the current user
"The locking status of the database
"The current layout of the database
"The current record of the databaseQ
cType
cType
cType
cChar
cEnumeration
cEnumeration
cObjectSpecifier
cObjectSpecifier
cTable
cFileMakerScriptT
The layouts in the database.
The scripts in the databaseV
absolute positionW
Class Info
Close
Count
Data Size
Exist
Get Data
Go To
What can I do with it?
Use the Database object to distinguish between different databases, in case you have more than one open.
Since a Database object is a FileMaker Pro file considered only as a collection of fields and records, choose Database instead of Document when you want FileMaker Pro to ignore temporary states of the document, like the found set, when evaluating your request.
For example, if you ask for record 1 of database 1, you will get the first record in the database r
egardless of found set. If you ask for record 1 of document 1, you will get the first record in the current found set, if there is one.
When using the current record and current layout properties it is not neccessary to specify the database object. For instance, a statement such as tell application "FileMaker Pro" to get current record will return a reference to the current record from the frontmost database.
The following are some Apple events that commonly apply to databases, with
sample AppleScript syntax:
If you want to: You can say:
close a database close database 1
count records in a database count records of database 1
see if a database exists (is open) exists database "FileMaker and Apple Events"
get Class Info of the database class info database
get data from a database get data database 1
get Data Size of a database data size database 1
open a database open file "FileMaker and Apple Events"
change the current record set current record to record 5
change the current layout set current layout to layout 2
What properties does it have?
Best Type. The Best Type of the Database object is simply 'obj ', meaning object.
Class. The Class of the Database object is 'cDB ', meaning database.
Default Type. The Defau
lt Type is also 'obj ', the same as Best Type.
Name. Returns the name of the database as it appears to the Finder. This is the name that should be used in a Tell statement from AppleScript.
Lock. The Lock property returns the current status of the database: Unlocked, Shared Lock, Exclusive Lock.
Current Layout. The Current Layout property returns a reference to the current layout.
Current Record. The Current Record property returns a reference to the current record.
Access. The Access pr
operty returns the access privileges of the database, which may be one or more from the following list: No Access, Read, Write, Update, Create, No Delete, Delete, Full.
Examples:
For AppleScript users:
The following script will return the data from the first cell of database 2.
tell application "FileMaker Pro"
cell 1 of database 2
end tell
To query database properties you can use the following:
tell application "FileMaker Pro"
best type of database 1
class of databa
default type of database 1
name of database 1
lock of database 1
current layout of database 1
current record of database 1
access of database 1
end tell
To get data from the current record you can use the following statements:
tell application "FileMaker Pro"
every cell of current record
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getPrope
rty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query database properties you can use the following:
with FileMaker
getProperty('pbst',database[1])) -- best type of the specified database
getProperty('pcls',database[1])) -- class of the specified database
getProperty('deft',database[1])) -- default type of the specified database
getProperty('pnam',database[1])) -- name of the specified database
getProperty('pLCK',database[1])) -- lock of the specified database
getProperty('pCLY',application[1])) -- object specifier for the current
layout
getProperty('pCRW',application[1])) -- object specifier for the current
record
getProperty('pACS',database[1])) -- access of the specified database
To use the database object to get data you use something like the follow
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Databaset
Database
cDatabase
Objectv
4H cDocumentI
'cdoc'J
DocumentK
A FileMaker Pro document.L
typeObjectSpecifier M pBestType
pClass
pDefaultType
pName
pIsModifiedN
'pbst'
'pcls'
'deft'
'pnam'
'imod'O best type
class
default type
modifiedP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The name of the document
4TRUE if database is not read-only or on locked mediaQ
cType
cType
cType
cChar
cBooleanS cDatabase
cFileMakerScriptT#The database this document contains
The scripts in this documentV
absolute positionW
Class Info
Close
Count
Data Size
Exist
Get Data
Go To
Print
What can I do with it?
Use the Document object to distinguish between different databases, in case you have more than one open. Choose Document instead of Database when you want FileMaker Pro to use the found set to evaluate your request. Document and Window are synonyms.
When working with Document objects, FileMaker Pro considers things that are not central to the actual data of the file, like the found set, unlike when it works with Database objects.
For example, if you ask for record
1 of database 1, you will get the first record in the database regardless of found set. If you ask for record 1 of document 1, you will get the first record in the current found set, if there is one.
The following are some Apple events that commonly apply to documents, with sample AppleScript syntax:
If you want to: You can say:
close a document close document 1
count documents
count document
see if a document is open exists document "Batters"
get Class Info about the document class info document
get data from a document get data document 2
get data size of a document data size document 1
open a document open file "Pitchers"
print a document print document "Addresses"
What properties does it have?
Best Type. The Best Type of the Document object is 'obj '.
Class. The Class of the Doc
ument object is 'docu'.
Default Type. The Default Type is also 'obj ', the same as Best Type.
Name. Returns the name of the document as it appears to the Finder. This is the name that should be used in a Tell statement from AppleScript.
Modified. The modified property returns true if the document has been edited in the current session.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
tell document 1
[statements here]
end tell
end tell
tell document "test
File" of application "FileMaker Pro"
if modified of document 3 is true then
copy cell 1 of document 2 to aVariable
end if
end tell
To query document properties you can use the following:
tell application "FileMaker Pro"
best type of document 1
default type of document 1
class of document 1
name of document 1
modified of document 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table o
f the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query document properties you can use the following.
with FileMaker
getProperty('pbst',document[1])) -- best type of the specified document
getProperty('deft',cell[1])) -- default type of the specified document
getProperty('pcls',cell[1])) -- class type of the specified document
getProperty('pnam',cell[1])) --
nname of the specified document
getProperty('imod',cell[1])) -- modified of the specified document
To get data from a cell using Frontier you could say the following.
with FileMaker
get(Application[1].document[1].record[1].cell[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Documentt
Document
cDocument
Objectv
cColumnI
'ccol'J
FieldK
A FileMaker Pro fieldL
typeCharM pBestType
pClass
pDefaultType
pName
pNullsOK
pRepeating
pRepeatSize
pUniqueValue
pAccess
pFormula
pProtection
pLock
pChoices
pGlobalValueN
'pbst'
'pcls'
'deft'
'ID '
'pnam'
'pNLS'
'pRPT'
'pRPS'
'pUNQ'
'pACS'
'pfor'
'ppro'
'pLCK'
'pCHS'
'pGLL'O best type
class
default type
nulls OK
repeats
repeat size
unique value
access
formula
protection
choices
globalValueP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The unique ID of the field
The name of the field
$FALSE if the field must have a value
7'rFxd' if defined as repeating; 'rSgl' if non-repeating
0The number of repetitions defined for this field
-TRUE if the field must contain a unique value
+The user's access privileges for this field
%The calculation formula for the field
The protection of the field
The locking status
(The value list associated with the field
Is this field a global field?Q
cType
cType
cType
cLongInteger
cChar
cBoolean
cEnumeration
cLongInteger
cBoolean
cEnumeration
cChar
cEnumeration
cEnumeration
cChar
cBooleanS
cCellT&The cells (record data) for the columnU
V6name
range
absolute position
relative position
Class Info
Count
Data Size
Exist
Get Data
Set Data
SortX}A field is a column of data, just like a column in a spreadsheet. A particular field on a particular record is called a cell.
What can I do with it?
Use the Field object to manipulate data across records or to specify a particular piece of data of a record.
Field objects are sometimes called columns, and are analogous to spreadsheet columns. A particular field on a particular record is a cell. Typically, you want to set data into and get data from cells, and not fields.
Related fields can also be accessed via Apple events. The name of a related field includes the relationship name separated by two colons such
as "Contacts::First Name". Similarly, the ID of a related field includes an identifier for the relationship. To access a related field it must exist on a layout in the master file. Because layout 0 includes all fields specified in the local database related fields cannot be accessed from this layout.
Note: It is important to realize that fields are not contained by records. If you were to tell FileMaker Pro set field 1 to aVariable, that cell in every record of the found set would be
changed.
The following are some Apple events that commonly apply to fields, with sample AppleScript syntax:
If you want to: You can say:
count fields in a database count field 1 class cell
see if a field exists exists field "Batting Average"
get class info of a field class info field
get data from a field field 1
get data from a field as text field 1 as text
count characters in
a field data size field 1
set data to a field set field 1 to "bob" (note -- changes all records!)
sort using a field sort by field "Record Number"
What properties does it have?
Best Type. The Best Type of the Field object is 'ccol', meaning column.
Class. The Class of the Field object is also 'ccol'.
Default Type. The Default Type is 'TEXT' for text fields, 'doub' for number fields, 'PICT' for container fields, and 'ldt ' for date and time fields.
Name. Ret
urns the name of the field as it appears in the Define Fields dialog. If a field is related, the name of the field includes the name of the related file separated by two colons such as "Contacts::First Name".
ID. The field ID property is a unique and persistent identifier for a field based on its creation order. When a field is related, the ID is a list with two items representing the relationship ID and the ID of the field in the related database.
Access. The Access property returns
the access privileges of the field, which may be one or more of the following: No Access, Read, Write, Update, Create, No Delete, Delete, Full.
Protection. The protection property returns the protected status of the field, which is one or more of the following: Read Only, Formulas Protected, Read, Write.
Lock. The lock property returns the lock status of the field, which is one of the following: Unlocked, Shared Lock, Exclusive Lock.
Nulls OK. Nulls OK is a Boolean property that returns tr
ue if the field has been defined in the Define Fields dialog to allow empty values, and false if the field must contain a value.
Repeats. Repeats is a constant that returns 'rFxd' if the field has been defined to be a repeating field in the Define Fields dialog, and 'rSgl' if it hasn
Repeat Size. Repeat Size returns a number indicating the number of repetitions of a field on a layout. Non-repeating fields have a value of 1; repeating fields return the maximum size defined for a field on
a particular layout. To determine the maximum number of repeats for a field as specified in the Define Fields dialog, specify layout 0.
Unique Value. Unique Value is a Boolean property that returns true if the field has been defined in the Define fields dialog to require a unique value for each record, and false if it hasn
Formula. The Formula property returns the field
s calculation formula. This property will be empty ("") for fields that are not defined as calculation fields.
Choice
s. The Choices property contains the value list associated with the field on a specific layout.
GlobalValue. The GlobalValue property is a Boolean property that returns true if the field has been defined in the Define fields dialog to be a global field.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
best type of field 1
class of field 1
default type of field 1
name of field 1
ID of field 1
access of field 1
protection of field 1
lock of field 1
nulls OK of field 1
repeats of field 1
repeat size of field 1
unique value of field 1
formula of field 1
choices of field 1
globalValue of field 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query field properties you
can use the following:
with FileMaker
getProperty('pbst',field[1]) -- best type of the specified field
getProperty('pcls',field[1]) -- class of the specified field
getProperty('deft',field[1]) -- default type of the specified field
getProperty('pnam',field[1]) -- name of the specified field
getProperty('ID ',field[1]) -- unique ID of the specified field
getProperty('pACS',field[1]) -- access of the specified field
getProperty('ppro',field[1]) -- protection of the specified field
getProperty('pLCK',field[1]) -- lock of the specified field
getProperty('pNLS',field[1]) -- nullsOK of the specified field
getProperty('pRPT',field[1]) -- repeats of the specified field
getProperty('pRPS',field[1]) -- repeat size of the specified field
getProperty('pUNQ',field[1]) -- unique value of the specified field
getProperty('pfor',field[1])
-- calculation formula of the specified
field
getProperty('pCHS',field[1]) -- choices, or value list, of a field
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
FileMaker Scriptt#FileMaker Script
cFileMakerScript
Objectv
cTableI
'ctbl'J
LayoutK
A FileMaker Pro layoutL
typeCharM pBestType
pClass
pDefaultType
pName
pAccess
pLock
pProtection
pKind
pVisibleN
'pbst'
'pcls'
'deft'
'ID '
'pnam'
'pACS'
'pLCK'
'ppro'
'pKND'
'pvis'O best type
class
default type
access
protection
visibleP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The unique ID of the layout
The name of the layout
The access for the current user
The locking status of the layout
The protection of the layout
1Indicates whether this table is a table or layout
+Is this layout visible in the layouts menu?Q
cType
cType
cType
cLongInteger
cChar
cEnumeration
cEnumeration
cEnumeration
cEnumeration
cBooleanS
cCell
cColumn
cRequest
>T&The cells (record data) for the layout
The fields on the layout
The records in the found set
!The find requests for this layoutU
V6name
range
absolute position
relative position
Class Info
Count
Data Size
Exists
Get Data
Go To
Set Data
What can I do with it?
Use the Layout object to move between layouts, to generate reports, or to restrict the available fields.
Layout objects are sometimes called tables. When working with a layout, FileMaker Pro considers only the fields that are on that layout.
An internal layout is always present, however, that contains all fields defined in the database. This layout is called layout 0, and you can use it whenever you are not sure where the field is that you want to work with. Dat
a is always retrieved from layout 0 in the order that fields were created in the Define Fields dialog. Note that layout 0 does not contain information that is layout-specific such as value lists associated with a field and related fields.
The following are some Apple events that commonly apply to layouts, with sample AppleScript syntax:
If you want to: You can say:
count layouts in a database count database 1 c
lass layout
see if a layout exists exists layout "Batters"
get class info of a layout class info layout
get data from a layout get data layout 1
get data size of a layout data size layout 1
switch to a particular layout show layout 1
set data in a layout set field 1 of layout 2 to "bob"
sort in a layout sort Layout 2 by Field "b" in order descending
What properties does it have?
Best Type. The Best Type of the Layout object i
s 'ctbl', meaning table, because a layout in FileMaker Pro is really a table.
Class. The Class of the layout object is 'ctbl'.
Default Type. The Default Type is 'TEXT'.
Name. Returns the name of the layout as it appears in FileMaker Pro.
ID. The ID is a unique and persistent number designation for a layout.
Access. The Access property returns the access privileges of the layout, which may be one or more of the following: No Access, Read, Write, Update, Create, No Delete, Delete, Full.
tection. The protection property returns the protected status of the layout, which is one or more of the following: Read Only, Formulas Protected, Read, Write.
Lock. The lock property returns the lock status of the layout, which is one of the following: Unlocked, Shared Lock, Exclusive Lock.
Kind. The kind property returns the kind of layout, which will either be Table or Layout. Layout 0 is Table, since it is the true layout of the database (a FileMaker Pro database has only one table), a
nd all other layouts have a kind property of Layout.
Visible. Visible is a Boolean value that indicates whether or not the layout is visible in the layout popup menu.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
show layout "Main Menu"
end tell
tell application "FileMaker Pro"
best type of layout 1
class of layout 1
default type of layout 1
name of layout 1
ID of layout 1
access of layout 1
protection of layout 1
lock o
f layout 1
kind of layout 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query window properties you can use the following:
with FileMaker
getProperty('pbst',layout[1]) -- best type of the specified layout
getProperty('pcls',layout[1]) -- c
lass of the specified layout
getProperty('deft',layout[1]) -- default type of the specified layout
getProperty('pnam',layout[1]) -- name of the specified layout
getProperty('ID ',layout[1]) -- unique ID of the specified layout
getProperty('pACS',layout[1]) -- access of the specified layout
getProperty('ppro',layout[1]) -- protection of the specified layout
getProperty('pKND',layout[1]) -- kind of the specified layout
g
etProperty('pLCK',layout[1]) -- lock of the specified layout
count(window[1],layout] -- counts the layouts in the specified window
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Layoutt
Layout
cTable
Objectv
cMenuI
'cmnu'J
MenuK
A menuL
typeCharM pBestType
pClass
pDefaultType
pName
pEnabledN
'pbst'
'pcls'
'deft'
'ID '
'pnam'
'enbl'O best type
class
default type
enabledP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The menu's resource ID
The menu's name
TRUE if the item is enabledQ
cType
cType
cType
cLongInteger
cChar
cBoolean
S cMenuItemT
The items of this menu.U
absolute positionW
Class Info
Create
Data Size
Delete
Duplicate
Exist
Get Data
Set Data
What can I do with it?
Use the Menu object to access menu items that execute commands from FileMaker Pro menus. For example, in AppleScript, you can say:
tell application "FileMaker Pro"
do menu menu item 5 of menu "Scripts"
end tell
This command tells FileMaker Pro to perform the fifth command under the Scripts menu, which is a FileMaker Pro script created by the database designer. Remember to count menu item separators when referring to menu items by their index number.
so, users have the ability to create menus in FileMaker Pro. A user-created menu is automatically placed in a submenu called "External", under the Scripts menu. Menus and menu items can be nested in the External menu. See an example in the AppleScript Examples section.
Note: FileMaker Pro has two "Mode" menus. The Mode menu used in Browse, Find, and Preview modes has an ID of 4 whereas the Mode menu used in Layout has an ID of 22.
The following are some Apple events that commonly apply
to menus:
If you want to: You can say:
copy a menu copy menu named "MyFirstMenu" to menu "MySecondMenu"
create a new menu create new menu with properties "MyFirstMenu"
delete a menu delete menu "MyFirstMenu"
see if a menu exists exists menu "MyFirstMenu"
get Class Info of a menu class info menu
make a menu inactive set enabled of menu 1 of menu "External" to false
Note: The App
le menu is menu 1. Hierarchical menus, like the Style menu, are both menus and menu items.
What properties does it have?
The Menu object has the following properties, or attributes:
Best Type. The Best Type of the menu object is 'obj '.
Class. The Class of the Menu object is 'cmnu'.
Default Type. The Default Type is 'obj '.
Name. Returns the name of the menu as it appears on the screen. This is the name that should be used in a Tell statement from AppleScript.
ID. The menu ID is a numbe
r (small integer) that returns the menu's resource ID.
Enabled. Enabled is a Boolean property that returns true if the menu is currently enabled (accessible), and false if the menu is grayed out.
Examples
For AppleScript users:
tell window 1 of application "FileMaker Pro"
do menu menu item "MyScript" from menu "Scripts"
end tell
To create a user-defined menu, you can say:
tell application
create new menu with properties "My Menu"
create new menu with properties "My Menu2"
create new menu with properties {name:"My Menu2 ",ID:123,enabled:false}
end tell
To query menu properties you can use the following:
tell application FileMaker pro"
best type of menu 1
class of menu 1
default type of menu 1
name of menu 1
ID of menu 1
enabled of menu 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = glob
als.property(theProperty,obj)
return(FileMaker.get(theObject))
To query menu properties you can use the following:
with FileMaker
getProperty('pbst',menu[1]) -- best type of the specified menu
getProperty('pcls',menu[1]) -- class of the specified menu
getProperty('deft',menu[1]) -- default type of the specified menu
getProperty('pnam',menu[1]) -- name of the specified menu
getProperty('ID ',menu[1]) -- ID of the specified menu
: getProperty('enbl',menu[1]) -- enabled of the specified menu
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Menut
cMenu
Objectv
9H cMenuItemI
'cmen'J Menu ItemK
A menu itemL
typeIntlTextM pBestType
pClass
pDefaultType
pEnabled
pItemNumber
pName
pChecked
pTargetIDN
'pbst'
'pcls'
'deft'
'enbl'
'itmn'
'pnam'
'pCHK'
'pADR'O best type
class
default type
enabled
item number
checked
notify addressP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
TRUE if the item is enabled
The menu item's number (index)
The menu item's name
+TRUE, if the menu item is currently checked
4Target ID of the application to notify when selectedQ
cType
cType
cType
cBoolean
cLongInteger
cChar
cBoolean
typeTargetID
<none>V
absolute positionW
Class Info
Data Size
Delete
Duplicate
Exist
Get Data
Set Data
What can I do with it?
Use the Menu Item object to access commands in FileMaker Pro menus. For example, in AppleScript, you can say:
tell application "FileMaker Pro"
do menu menu item "Copy" of menu "Edit"
end tell
This command tells FileMaker Pro to perform the fifth command under the Scripts menu, which would be a FileMaker Pro script created by the database designer.
Users have the ability to create menu items in FileMaker Pro. A user-created menu item is automatically pl
aced in a submenu called "External", under the Scripts menu. Menus and menu items can be nested in the External menu. See an example in the AppleScript examples section.
The following are some Apple events that commonly apply to menu items, with sample AppleScript syntax:
If you want to: You can say:
create a new menu item create new menu item with properties "Item" of
menu
"External"
delete a menu item delete menu item "Item" of menu "External"
see if a menu item exists exists menu item "Item" of menu "External"
get Class Info of a menu item class info menu item
make a menu item inactive set enabled of menu item 2 of menu "External"
to false
put a check mark beside a menu item set checked of menu item 2 of menu "External"
t
o true
What properties does it have?
The Menu Item object has the following properties, or attributes:
Best Type. The Best Type of the Menu Item object is simply 'obj ', meaning object.
Class. The Class of the Menu Item object is 'cmen'.
Default Type. The Default Type is also 'obj ', the same as Best Type.
Name. Returns the name of the menu item as it appears on the screen. The ellipsis following some menu item names must be included and is generated by an option-semi-colon.
ID. The ID
is a unique and persistent number for menu items that have been created via Apple events.
Enabled. Enabled is a read-write Boolean property that returns true if the menu item is currently enabled (accessible), and false if the menu is grayed out.
Item Number. The Item Number is the the number of the menu item, meaning its position within the menu.
Checked. Checked is a read-write Boolean property that returns true if the menu item is currently checked, and false if the menu item is not che
cked.
Notify Address. Notify Address is the ID of the application that created the menu item. It is used by menu items created by users in the External menu. For example, you can create a menu item in FileMaker Pro that calls a script in HyperCard when the menu item is selected. The application that creates a menu must have some way to respond when the menu item is selected.
Examples
For AppleScript users:
tell window 1 of application "FileMaker Pro"
do menu menu item "MyScript" fro
m menu "Scripts"
end tell
To create a user-defined menu item, you would say:
tell application "FileMaker Pro"
create new menu item with properties "My Menu item"
create new menu item with properties "new menu item2"
create new menu item with properties {name:"new menu item3", ID:123,
enabled:false}
end tell
To query menu properties you can use the following:
tell application "FileMaker Pro"
best type of
menu item 1 of menu 2
class of menu item 1 of menu 2
default type of menu item 1 of menu 2
name of menu item 1 of menu 2
ID of menu item 1 of menu 2
enabled of menu item 1 of menu 2
item number of menu item 1 of menu 2
checked of menu item 7 of menu 2
notify address of menu item 1 of menu "external"
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(thePr
operty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query menu properties you can use the following:
with FileMaker
getProperty('pbst',menu[2].menuItem[1]) -- best type of the specified
menu item
getProperty('pcls',menu[2].menuItem[1]) -- class of the specified
menu item
getProperty('deft',menu[2].menuItem[1]) -- defa
ult type of the specified
menu item
getProperty('pnam',menu[2].menuItem[1]) -- name of the specified
menu item
getProperty('ID ',menu[2].menuItem[1]) -- ID of the specified menu item
getProperty('enbl',menu[2].menuItem[1]) -- enabled of the specified
menu item
getProperty('itmn',menu[2].menuItem[1]) --
item number of the specified
menu item
getProperty('pCHK',menu[2].menuItem[1]) -- checked of the specified
menu item
getProperty('pADR',menu["external"].menuItem[1]) -- checked of the
specified menu item
(only applies to user
> created menu items)
To create a user-defined menu item, you would use:
with FileMaker
create(menuItem,"","My Menu Item",insertionLoc(last,menu["external"])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
s Menu Itemt
Menu Item
cMenuItem
Objectv
cRowI
'crow'J
RecordK
A FileMaker Pro recordL
typeCharM pBestType
pClass
pDefaultType
pName
pAccess
pProtection
pLockN
'pbst'
'pcls'
'deft'
'ID '
'pnam'
'pACS'
'ppro'
'pLCK'O best type
class
default type
access
protection
lockP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The unique ID of the record
-Empty, FileMaker Pro records don't have names
,The user's access privileges for this record
The protection on the record
The locking status of the recordQ
cType
cType
cType
cLongInteger
cChar
cEnumeration
cEnumeration
cEnumerationS
cCellT&The cells (record data) for the recordU
V6name
range
absolute position
relative position
Class Info
Count
Create
Data Size
Delete
Duplicate
Exist
Get Data
Go To
Set Data
What can I do with it?
Use the Record object to access data across a database. Record objects are sometimes called rows.
The following are some Apple events that commonly apply to records, with sample AppleScript syntax:
If you want to: You can say:
copy a record copy record 1 to aVariable
count records count record
create a new record create new record with data "Bob"
delete a recor
d delete record 1
duplicate a record duplicate record 1
see if a record exists record 5 exists
class info of a record class info record
get data from a record get data record 1
count characters in a record data size record 1
find a group of records show every record whose cell "State" contains "CA"
find all records show every record
set data to a record set record 1 to {"Bob", "Jones"}
get contents of curre
Recordt
Record
Objectv
cRequestI
cRQTJ
RequestK
A FileMaker Pro find requestL
typeCharM pBestType
pClass
pDefaultType
pName
pOmittedN
'pbst'
'pcls'
'deft'
'pnam'
'ID '
'pOMT'O best type
class
default type
omittedP5Descriptor type containing best info about this class
Class ID of the object
&Default descriptor type for this class
The name of the request
The unique ID of the request
$True if the request is to be omittedQ
cType
cType
cType
cChar
cLongInteger
cBoolean
cCellT(The cells (request data) for the requestU
V6name
range
absolute position
relative position
testW
Class Info
Count
Create
Data Size
Delete
Duplicate
Exist
Get Data
Go To
Set Data
nt record every cell of current record
What properties does it have?
Best Type. The Best Type of the Record object is 'crow', meaning row, for record.
Class. The Class of the Record object is 'crow'.
Default Type. The Default Type is 'TEXT'.
Name. Always returns "", since FileMaker Pro records do not have names.
ID. The ID is a unique and persistent number designation for a record.
Access. The Access property returns the access privileges of the record, which may be one or more of the fo
llowing: No Access, Read, Write, Update, Create, No Delete, Delete, Full.
Protection. The protection property returns the protected status of the record, which is one or more of the following: Read Only, Formulas Protected, Read, Write.
Lock. The lock property returns the lock status of the record, which is one of the following: Unlocked, Shared Lock, Exclusive Lock.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
record 1
end tell
This command gets all the data
in the first record of the topmost database.
To query record properties you can use the following:
tell application "FileMaker Pro"
best type of record 1
class of record 1
default type of record 1
name of record 1
ID of record 1
access of record 1
protection of record 1
lock of record 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(thePrope
rty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query record properties you can use the following:
with FileMaker
getProperty('pbst',record[1]) -- best type of the specified record
getProperty('pcls',record[1]) -- class of the specified record
getProperty('deft',record[1]) -- default type of the specified record
getProperty('pnam',record[1]) -- name of the specified record
getProperty('ID ',r
ecord[1]) -- ID of the specified record
getProperty('pACS',record[1]) -- access of the specified record
getProperty('ppro',record[1]) -- protection of the specified record
getProperty('pLCK',record[1]) -- lock of the specified record
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the FrontierH
.root.
What can I do with it?
Use the Request object to create, edit, or access FileMaker Pro find requests which can retrieve records from a database.
To create a brand new set of requests, first delete any previous requests using the statement "delete every request", then use the "create request" statement to make the first request. After creating the requests, use the Find event to perform the find.
The Request object behaves much like the Record object except that only one set of requests
is stored for a database. For instance, when using the Show event on a particular request, FileMaker Pro will display all current requests and make the specified one visible. Using a Go To or Show event with a request will switch the database to Find mode.
Note: when deleting all requests, there is a null request (request 0) until a request is created or the database is switched to another mode at which time an initial blank request is created (request 1).
The following are some Apple e
vents that commonly apply to requests, with sample AppleScript syntax:
If you want to: You can say:
copy a request copy request 1 to aVariable
count requests count request
create a new request create request with data "Bob"
create an ommited request create request with properties {omitted: true}
delete a request delete request 1
delete all requests delete every re
quest
duplicate a request duplicate request 1
see if a request exists request 5 exists
class info of a request class info request
get data from a request get data request 1
go to a specific request go to request 4
display a specific request show request 2
display all requests show every request
set data to a request set request 1 to {"Bob", "Jones"}
set data to a request set cell 1 of request 1 to "Bob"
omit a request
set omitted of request 2 to true
perform find requests find
What properties does it have?
Best Type. The Best Type of the Request object is 'list
Class. The Class of the Request object is 'cRQT'.
Default Type. The Default Type is 'TEXT'.
Name. Always returns "", since FileMaker Pro requests do not have names.
ID. The ID is a unique number designation for a request.
Omitted. Omitted is a boolean property that returns true if a find request has been omitted, and false if
it has not. The omitted property can be used to exclude records from being found.
Examples:
For AppleScript users:
tell application "FileMaker Pro"
delete every request
create request
set cell "First Name" of request 1 to "Joe"
find
end tell
This command gets all the data in the first request of the frontmost database.
To query request properties you can use the following:
tell application "FileMaker Pro"
best type of request 1
class of request 1
de
fault type of request 1
name of request 1
ID of request 1
omitted of request 1
end tell
For Frontier users:
To get properties of objects using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query request properties you can use the following:
with FileMaker
getProperty('pbst',request[1]) -- best type of the specifi
ed request
getProperty('pcls',request[1]) -- class of the specified request
getProperty('deft',request[1]) -- default type of the specified request
getProperty('pnam',request[1]) -- name of the specified request
getProperty('ID ',request[1]) -- ID of the specified request
getProperty('pOMT',request[1]) -- omitted of the specified request
To create a request, you can say:
with FileMaker
create(request,"somedata","",insertionLo
c(last,window[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Requestt
Request
cRequest
Objectv
Helpu
Helpv
kAECoreSuiteZ
'core'\
kAESetData]
'setd'
keyDirectObject
keyAEData_
typeObjectSpecifier
varies`
a"The object whose data is to be set
The new data
Sets the data of the object to the supplied value.
Note: Attempts to set the data of objects that are read-only will fail with the error errAEWriteDenied (-10006). If the database is locked, read-only, or the user lacks the proper privileges, the operation will also fail.
Set the data of an objecth
Set Datak
'----'
'data'
set data <object specifier> data <the data>
Set data visible of window 3 data false
Set data cell named "FirstName" of record 1 data "Brendan"
Set data checked of menuItem named "external menu 1"
What can I do with it?
Use the Set Data event to place data into an object, like a field, cell, record, or request.
When using the Set Data event you must provide an object specifier, like record 1, and the data you want to put into the object.
set data record 1 data {"Jane", "Austen"}
The Set Data event can be used to set data types such as pictures, sounds, and QuickTime movies into FileMaker Pro container fields. It is also possible to use Apple events to set a reference to a pictur
e file in a container field
for example set cell 1 to file "Macintosh HD: My Picture". FileMaker Pro treats the image as if it were imported using the "store file reference" option. Note: the reference to the picture must be of type "file".
Note: You must have write access in order to set data. If you attempt to set the data of a read-only object, FileMaker Pro will fail the event, and return the error errAEWriteDenied (-10006).
Examples
For AppleScript users:
If you want to set da
ta to: You can say:
a record with at least two fields set record 1 to {"Jane", "Austen"}
a field on the last record set cell "Last Name" of last record to "Austen"
a field on the second record set cell "Last Name" of record after record 1
to "Austen"
a user-defined menu item set checked of menu item "menu 1" of menu
"External" t
o true
the last record set data last record to "a<tab>b<tab>c"
the middle record set data cell 1 of middle record to "yes"
a field of a record of a window set data field 1 of window 1 to "bob"
records matching a certain condition set data (every record of window "temp" whose cell 1 contains "a" and cell 2
"b") to "c"
the name of a user-defined menu item set data name of menu item 1 of menu "external"
to "NewName"
the enabled property of a menu item set data enabled of menu item 1 of menu
"external" to false
the visible property of a window set data visible of window 1 to true
(Other operators that can be used with "whose" clauses: <,
setProperty('pvis',window[1],false) -- hides the first FileMaker Pro window
setProperty('pnam',menu["external"].menuItem[1],"aName") -- names the first
menu item of the
a external menu (only
user-defined menu
items)
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Set Datat
Set Datau
Eventv
kAEMiscStandardsZ
'misc'\
kAEMakeObjectVisible]
'mvis'^
keyDirectObject_
typeObjectSpecifier`
The objects to show
%Useful on cWindow, cDatabase, cRow, and cTable classes.
This event may be used to instruct FileMaker Pro to switch to a desired layout, show a set of records, or reveal a hidden window.
When used in conjunction with a "whose" statement on records, this event results in a FileMaker Pro Find.
g$Makes the specified objects visible.h
Showk
'----'
show <object specifier>
show window 8
show layout named "Main Screen"
show every record whose cell named "Last Name"
"McCarthy"
What can I do with it?
Use the Show event to display a layout, or groups of records. When operating on records in conjunction with the "whose" statement, Show is much like a find request in FileMaker Pro.
The Show event will work on the following objects: Window, Document, Database, Record, Request, and Layout. The object must already be open or available; so it may be necessary to open a window, document or database before showing something within it.
To use the Show event, provide an
object specifier for the object to be shown, like records whose cell "Last Name"
"Bellamy", or every record, or layout 2.
Using Show with the Database object selects records from the entire database. A Show event directed at a Document, however, retrieves records from the current found set. With the Document object, you can start with a broad search criteria and narrow the found set with subsequent Show events.
Note: using the Show event on a Window, Database, or Document makes the o
bject visible if it was hidden but does not activate it (ie. bring it to the front). Instead, use the Go To event to activate and display a database.
Because the Show event uses AppleScript terminology to find data, it does not accept FileMaker Pro find symbols such as the current date or duplicate symbols (eg. //, !). To use these types of symbols create a find request and set the find symbol into a cell. Here is a table showing AppleScript terminology and the corresponding FileMaker fi
nd symbols.
FileMaker
AppleScript terminology equivalent
contains text
begins with text*
ends with *text
equals = (exact match)
greater than >
less than <
greater than or equal to
lesser than or equal to
not equal to Omitted request
or Multiple requests
and Data in multiple fields within a request
greater than and less than ...
Not supported via Show Duplicate, Current Date, Single character, Today's date and Invalid date or time
Examples
r AppleScript users:
If you want to: You can say:
get a found set of first record show record 1
make a hidden window visible show window "Lookup File"
display a different layout show layout "Sales Summary"
find all records show every record of database 1
find a group of records show every record of database 1
whose cell "Last Name" contains "Swain"
find records within t
he found set show every record of document 1
whose cell "First Name" contains "Joe"
find records that are empty show every record of database 1
whose cell "Zip Code" = ""
find records that are not empty show every record of database 1
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Showt
Showu
Eventv
cWindowI
'cwin'J
WindowK A FileMaker Pro document window.L
typeObjectSpecifier M pBestType
pBounds
pClass
pDefaultType
pHasCloseBox
pHasTitleBar
pIndex
pIs Floating
pIsModal
pIsResizeable
pIsZoomable
pIsZoomed
pName
pVisibleN
'pbst'
'pbnd'
'pcls'
'deft'
'hclb'
'ptit'
'pidx'
'isfl'
'pmod'
'prsz'
'iszm'
'pzum'
'pnam'
'pvis'O best type
bounds
class
default type
has close box
has title bar
index
floating
modal
resizeable
zoomable
zoomed
visibleP5Descriptor type containing best info about this class
The bounds of the window
Class ID of the object
&Default descriptor type for this class
"TRUE if the window has a close box
"TRUE if the window has a title bar
0The index (front-to-back ordering) of the window
'TRUE if the window is a floating window
TRUE if the window is modal
!TRUE if the window can be resized
!TRUE if the window has a zoom box
&TRUE if the window is currently zoomed
The name of the window
TRUE if the window is visibleQ
cType
cQDRectangle
cType
cType
cBoolean
cBoolean
cLongInteger
cBoolean
cBoolean
cBoolean
S cDatabase
cDocument
cFileMakerScriptT!The database this window contains
The document in this window
The scripts in this windowV
absolute positionW
Class Info
Close
Count
Data Size
Exist
Get Data
Go To
Print
What can I do with it?
Use the Window object to distinguish between FileMaker Pro files that are already open. For example, in AppleScript, you could say:
tell window 2 of application "FileMaker Pro"
create new record with data {"Sue", "Smith"}
end tell
This syntax channels the statements to the second window of the FileMaker Pro application. The current window is always window 1.
The following are some Apple events that commonly apply to windows, with sample AppleScript s
yntax:
If you want to: You can say:
copy an object specifier of the window copy window 1 to bob
close a window close window 1
count the number of open windows count windows
see if a particular window is open window "Sales Report" exists
get Class Info of the window object class info window
get data of a window (get object specifier) get data
window 1
print a window print alias "window1:Folder1:HardDisk"
You might choose to use the Window object over the Document object, because the Window object has certain properties the Document object doesn't have, such as a zoomed property.
What properties does it have?
The Window object has the following properties, or attributes:
Best Type. The Best Type of the Window object is 'obj ', meaning object.
Class. The Class of the Window object is 'cwin', mea
ning window.
Default Type. The Default Type is also 'obj ', the same as Best Type.
Bounds. The Bounds property returns the boundary rectangle for the window.
Name. Returns the name of the window as it appears to the Finder. This is the name that should be used in a Tell statement from AppleScript.
Visible. Visible is a Boolean property that returns true if the window is visible, and false if the window isn't.
Index. The index of a window is the number of the window, which indicates its re
lative position among open windows. The active window is always window 1, and the other windows that are open, if any, would be numbered 2 and higher, in consecutive order.
Floating. Floating is a Boolean property that returns true if the window is a floating window, and false if the window isn't.
Zoomable. Zoomable is a Boolean property that returns true if the window is a zoomable window, and false if the window isn't.
Zoomed. Zoomed is a Boolean property that returns true if the window
is currently in a zoomed state, and false if the window isn't.
Modal. Modal is a Boolean property that returns true if the window is a modal window, and false if the window isn't.
Resizable. Resizable is a Boolean property that returns true if the window is a resizable window, and false if the window isn't.
Has Close Box. Has Close Box is a Boolean property that returns true if the window has a close box, and false if the window doesn't.
Has Title Bar. Has Title Bar is a Boolean property
that returns true if the window has a title bar, and false if the window doesn't.
Examples
For AppleScript users - the following script illustrates how to close all open windows:
tell application "FileMaker Pro"
if window 1 exists then
repeat count of window times
close window 1
end repeat
end if
end tell
This script copies some data from the second cell in the found set of the frontmost window to a variable, then copies that variable into the third cell of the second
window.
To query window properties you can use the following:
tell window 1 of application "FileMaker Pro"
best type of window 1
class of window 1
default type of window 1
bounds of window 1
name of window 1
index of window "windowName"
floating of window 1
zoomable of window 1
zoomed of window 1
resizable of window 1
has close box of window 1
has title bar of window 1
end tell
For Frontier users:
To get properties of obje
cts using Frontier add the following script to the FileMaker Table of the Frontier root.
on getProperty(theProperty,obj)
theObject = globals.property(theProperty,obj)
return(FileMaker.get(theObject))
To query window properties you can use the following:
with FileMaker
getProperty('pbst',window[1]) -- best type of the specified window
getProperty('pcls',window[1]) -- class of the specified window
getProperty('deft',window[1]) -- default type of the sp
ecified window
getProperty('pbnd',window[1]) -- bounds of the specified window
getProperty('pnam',window[1]) -- name of the specified window
getProperty('pvis',window[1]) -- visible of the specified window
getProperty('pidx',window[1]) -- index of the specified window
getProperty('isfl',window[1]) -- floating of the specified window
getProperty('iszm',window[1]) -- zoomable of the specified window
getProperty('pzum',win
dow[1]) -- zoomed of the specified window
getProperty('pmod',window[1]) -- modal of the specified window
getProperty('prsz',window[1]) -- resizable of the specified window
getProperty('hclb',window[1]) -- has close box of the specified window
getProperty('ptit',window[1]) -- has title bar of the specified window
with FileMaker
get(application[1].window[1].record[1].cell[1])) -- data from first cell of
L
of first record of the
frontmost window
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Windowt
Window
cWindow
Objectv
Apple events are a Macintosh Operating System technology that lets applications communicate with one another on the same Macintosh computer or over a network. It is primarily a data transport mechanism. Both the sending and receiving application must agree to use a mutually understood data format in order to communicate.
An example of this is the Finder. The Finder can send four simple Apple events (also called the Required events) that all System 7-savvy applications are required to u
Onderstand: Open Application, Open Documents, Print Documents, and Quit Application. Because both the Finder and the System 7 application understand what is meant by these events, the appropriate actions take place when Finder sends them. Applications can also use these events to make other applications perform the desired actions.
What are Apple Events?G
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects appearing to the right are contained in objects to the right of them. This containment is indicated by dotted
^gray lines. Clicking on the title of an Object will switch to a detailed view of that class.
Objects and Events List
This layout provides a list view all of the Events and Objects which are supported in FileMaker Pro 2.0. It provides the same infomation as the
FileMaker Objects Map
in a different manner. Clicking on
Lthe title of an Object or Event will switch to a detailed view of the item.
Using the Content Layouts
FileMaker Events
This layout gives detailed information about each Event which FileMaker Pro 2.0 supports. The information supplied includes the event class, ID, terminology, and input and result parameters. The
ached the end of the information given for that layout. Choose
2another layout to continue with more information.
Using the Navigation Layouts
$
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about support for Apple events in
^FileMaker Pro. Each record has an informative text field as well as an (optional) example.
FileMaker Objects Map
This layout is a navigation aid for getting to the information about a specific Event or Object. It displays all of the Events and Objects which are supported in FileMaker Pro 2.0, grouped according to
mApple Event Suites. Clicking on the title of an Object or Event will switch to a detailed view of the item.
Object Hierarchy
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it.
These icons are used throughout the database to let you change the information displayed without having to return to the main screen. The forward and backward arrow icons above switch to the next and previous
records, respectively. You can also use the layout pop-up menu in the status area, record book or scripts to move through the database.
Note: not all records in this database have data for every field. If you encounter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose
wfor the Open Document event, which specifies the document that is to be opened.
Parameters usually indicate the:
object (for example, window, document, or script) on which the Apple event should act
data to use (for example, a picture to paste)
desired options when performing the event (for example, with or without dialog or page
numbers to print)
E The Components of an Apple EventG
W Apple Event Components and Examples
Y Event Name Event Class Event ID Parameters (vary)
Q Open Application 'aevt' 'oapp' none
j Open Documents 'aevt' 'odoc' '----' (the documents to open)
j Print Documents 'aevt' 'pdoc' '----' (the documents to print)
S Quit Application 'aevt' 'quit' none
m Do Script 'misc' 'dosc' '----' (the script to perform)
Introv
a to use (for example, a picture to paste)
desired options when performing the event (for example, with or without dialog or page
numbers to print)
E The Components of an Apple EventG
W Apple Event Components and Examples
Y Event Name Event Class Event ID Parameters (vary)
Q Open Application 'aevt' 'oapp' none
j Open Documents 'aevt' 'odoc' '----' (the documents to open)
j Print Documents 'aevt' 'pdoc' '----' (the documents to print)
The true power of Apple events comes not just from the standard events (or verbs) but also from the way the objects (or nouns) are defined. The objects specify the information on which the events operate (for example, windows, documents, text, scripts, or graphics). Because each application creates documents that contain different objects, standard object classes let an application manipulate the data in another application by using a standard language.
The Object Model gives you a way toause each application creates documents that contain different objects, standard object classes let an application manipulate the data in another application by using a standard language.
The Object Model gives you a way to
describe the data in another application and to standardize similar objects across applications. The Apple Events Registry contains definitions for standard objects and events. Separating nouns and verbs in Apple events lets a relatively small set of events and objects provide a great deal of power. For example, the Get Data event gets the data of any object indicated in its direct parameter.
The Object ModelG
Events (verbs) Objects (nouns)
Close Application
Create Document
Delete File
Exists Window
f Get Data Cell
Data Size Layout
Open Record
Set Data
Show
Introv
In the Object Model, objects are defined by:
their class ID (like the event ID)
a list of properties
a list of elements
Each occurrence of an object may have different values for its properties and elements.
An object
s properties describe the traits common to all objects in that class. An object
s elements describe the other object classes that an object may contain.
All objects in a given class have the same properties and elements, regardless of their data. For example
, all windows have a size and a name, and all text has characters and a style.
In addition to describing the contents of objects, the Object Model includes reference forms, or keyforms, which are ways to describe objects of interest. An object can be specified by its name, index (within its container object), absolute ordinal position, by testing the value of its properties, or by any application-defined method.
More About ObjectsG
Object Class Components of a FileMaker document window
Class ID: 'cwin'
Properties: pName pIsModal Elements: cDocument
pBounds pIsResizeable cDatabase
pHasCloseBox pIsZoomable
pHasTitleBar B
pIsZoomed
pIndex pVisible
pIsFloating
Introv
The first two methods of specifying an object
by name and by index
are called simple object specifiers. Any application that supports the Object Model must support simple specifiers for accessing all of its objects. Complex object specifiers are more powerful, but may not be supported for all objects.
Object specifiers can also refer to a list of objects (for example,
every record
). Combine object specifiers with events to yield some useful results.
Note: The object specifiers in
the following examples are represented as English-like statements for the purposes of clarity; the actual syntax will depend on the scripting language being used.
Examples:
do script named "Generate Monthly Report"
get the first word of paragraph 6 of the document named "Letter of Intent"
get data for every record whose field named "Sales Total"
50,000
create new record in the database named "Personnel"
Specifying ObjectsG
C Simple Object Specifiers
X Name: field name "Total Sales"
` Index: word 5 of document named "Fred"
D Complex Object Specifiers
P Range: layout 1 thru 3
O Ordinal: every record
e Test: window whose title is "Monthly Report"
Introv
Functionally related objects and events are grouped together in suites:
the Required suite
the Core suite (common to all applications)
the Text suite (for word processors)
the QuickDraw Graphics suite (for graphics programs)
the Table suite (for tabular data)
the Database suite (for database programs)
the Miscellaneous Standards suite (for the miscellaneous bits, like scripts, that some
applications support)
All suites inherit the events and obj
Rects in the Core suite. Some applications define extensions to the events and/or objects of a suite. Applications may support an entire suite or a subset of it. For example, a word processor might support the Core and Text suites fully but only support the portions of the Table or Database suites necessary to perform a mail merge.
Apple Event SuitesG
Introv
FileMaker Pro supports nearly all of the events and objects defined in the Core, Table, Database, and Miscellaneous suites. Together, these events are called the FileMaker suite. The Apple events support of FileMaker Pro gives access to most of the features available in Browse and Find modes. Through Apple events, you can create and delete records, change layouts, perform finds, get and set record data, and execute FileMaker Pro scripts. There is no support for defining new fields, alte
Uring field definitions, creating or modifying layouts or scripts, or setting up access privileges.
FileMaker Pro only accepts Apple events from the local computer. To access data on a networked FileMaker Pro database, the user must first open the database locally. The user
s access privileges are taken into account for all Apple events.
The FileMaker SuiteG
Introv
Supported Reference FormsG
Reference Form Examples
Name Index Relative Absolute Unique ID
cell "First Name" cell 1 cell before cell "First Name" first cell cell ID {1,1}
layout "Data Entry" record 6 record after current record last record record ID 6
field "Last Name" field 4 record before current record some record field ID 7
Test Range
every record records 1 through 5
name of every field fields 3 through 4
every record whose cell "State" = "CA" cells 1 thru 2 of record 4
Bcevery record whose cell "State" = "NY" and
cells 2 thru 3 of field 1
cell "City" = "New York"
Introv
"before" and "after", as in the statement go to record after record ID 127.
Supported Reference FormsG
Reference Form Examples
Name Index Relative Absolute Unique ID
cell "First Name" cell 1 cell before cell "First Name" first cell cell ID {1,1}
layout "Data Entry" record 6 record after current record last record record ID 6
field "Last Name" field 4 record before current record some record field ID 7
Test Range
every record records 1 through 5
name of every field fields 3 through 4
every record whose cell "State" = "CA" cells 1 thru 2 of record 4
Bcevery record whose cell "State" = "NY" and
cells 2 thru 3 of field 1
cell "City" = "New York"
Introv
FileMaker Pro supports simple object specifiers (the name and index keyforms) for all objects. Additionally, FileMaker Pro supports complex object specifiers (relative position, absolute position, range, and test reference forms), and one custom reference form (unique ID) for the following objects: FileMaker Script, Layout, Field, Record, Request, and Cell.
The custom reference form, formUniqueID uses a persistent, unique ID to identify the indicated object. This reference form is th
e most efficient way to refer to FileMaker Pro objects and will remain unique for the life of the database. Once an object has been deleted, its ID is never reused.
Although IDs are unique, they are not always linearly sequential. For example, the ID of one record might be 127 and the next sequential record ID might be 32896. To obtain an ID of an object sequentially, use the reference forms "before" and "after", as in the statement go to record after record ID 127.
FileMaker Pro provides
default containment
to help make scripts shorter and determine which object to use if none is specified. Normally, to specify an object, you must explicitly provide the containment of the object. Default containment means that FileMaker Pro makes assumptions about the containment path. For example, FileMaker Pro will assume the frontmost window, document, database, or layout if an object specifier is not given.
Note that if no record is specified, FileMaker Pro
assumes the first record, not the current record. To access the current record, use the current record property of a database. FileMaker Pro always assumes the current found set unless you explicitly specify the database object, in which case all records from the database are considered. Cells and fields of requests must be specified explicitly.
When this object has not been specified Default containment substitutes
record record 1
layout current layout
wind
Cpow frontmost window
database frontmost database
document frontmost document (current found set)
Default ContainmentG
In the following examples, assume that "Data Entry" is the current layout, "Customers" is the frontmost window, and record 5 is the current record.
cell 1 cell 1 of record 1 of layout "Data Entry" of document "Customers"
field 1 field 1 of layout "Data Entry" of document "Customers"
record 1 record 1 of layout "Data Entry" of document "Customers"
current record record 5 of layout "Data Entry" of document "Customers"
current layout layout "Data Entry" of document "Customers"
Introv
A FileMaker Pro database technically has only one table. However, for the purposes of Apple events, it is useful to map the cTable object class to layouts in FileMaker Pro databases. Therefore, each cTable object corresponds to a layout. The fields on a layout correspond to the cColumn elements in the cTable object. Sending a Count event for a cTable object will return the number of layouts in the database. Get Data can also be used on a layout to retrieve data only for those fields t
hat appear on the layout.
To access all of the fields in a database, FileMaker Pro defines a special layout which is the true table for the database. Using 0 as the index, or the database name as the cTable name, generates an object specifier to the main table of a FileMaker Pro database. The value of the
pKind
property of a cTable object is
table
for layout 0, and
for all other layouts.
FileMaker Pro LayoutsG
Introv
The cColumn elements of a cTable object correspond to the fields appearing on a FileMaker Pro layout. It is important to note that, for Apple events, the order of these fields is the creation order (the order in which they are listed in the Define Fields dialog when
creation order
is selected from the view order pop-up menu), not the tab order or the graphical ordering in which they may appear on the layout.
If an application issues a Get Data event on a record, request, or layout, the
R data will be returned using the creation order of the fields. If the field is a date, time, or number field, the data will be returned as formatted on the layout (as set in the Date, Time, and Number Format dialogs).
When using the Set Data event with a record, request, or layout, the data should be supplied in field creation order.
Fields and Field OrderG
Introv
FileMaker Pro accepts lists as parameters for most events. This makes it possible to minimize the number of events necessary to perform a task that involves several objects. For example, sending a list of object specifiers (possibly of different classes) as the direct parameter of the Get Data event causes FileMaker Pro to return a list as the result. The order of items in the list corresponds to the matching input parameters.
FileMaker Pro also returns lists if the result of a query iB
s more than one item. For example, the Apple event equivalent to the statement:
get the name of every FileMaker script
might yield:
{"script 1", "find and sort", "Generate report", "script 4"}
Lists as ParametersG
Introv
FileMaker Pro may receive input from Apple events sources other than the user. Because much of the behavior of FileMaker Pro is state-dependent, an application might want to ensure the state of a database before issuing a series of related commands. To achieve this, FileMaker Pro supports the notion of Apple events transactions. Note that Apple event transactions are not the same as database transactions, which FileMaker Pro does not support.
Apple event transactions allow an applica
tion to establish an exclusive dialog with FileMaker Pro. While engaged in a transaction, Apple events from other transactions are ignored. An application should use transactions only while necessary, and minimize their duration.
There may be some circumstances under which the user is considered to be involved in a transaction. For example, a user is in an implicit transaction if she is executing a FileMaker Pro script (unless the script is paused), in a modal dialog, or editing a reco
chosen, FileMaker Pro sends the indicated event, with the document
s alias as the direct parameter ('----'). If the target is an application, you can choose from several options what text to send as the direct parameter. FileMaker Pro can only include one parameter with an event.
E/Sending Apple Events from FileMaker Pro ScriptsG
Introv
When sending events, FileMaker Pro performs no analysis on the event class, event ID, or parameter text to ensure their validity. Ensuring validity is up to the FileMaker Pro database designer. When the script is executed, FileMaker Pro launches the target application, if necessary, and sends the event.
When sending an Apple event from a FileMaker Pro script, the designer can select from checkboxes to send the contents of a field from the current record as the direct parameter, bring th
'e target application to the foreground, and copy the results of the script to the Clipboard.
For example, it is possible to open an AppleScript applet, ask Microsoft Excel to execute an Excel script, trigger a HyperCard stack handler, or send HyperTalk text directly to HyperCard for execution.
E More About FileMaker Pro ScriptsG
Introv
t, the designer can select from checkboxes to send the contents of a field from the current record as the direct parameter, bring thelidity. Ensuring validity is up to the FileMaker Pro database designer. When the script is executed, FileMaker Pro launches the target application, if necessary, and sends the event.
When sending an Apple event from a FileMaker Pro script, the designer can select from checkboxes to send the contents of a field from the current record as the direct parameter, bring the
In addition to sending Apple events, FileMaker Pro scripts can now compile and perform AppleScript statements stored within a script or within the contents of a field on the current record.
To do this, add a Perform AppleScript step to a FileMaker Pro script and click on the Specify button. To perform the same commands each time the script is run, type up to 32K of text into the script text portion of the script step. FileMaker Pro will compile the script when you click OK and will notscript or within the contents of a field on the current record.
To do this, add a Perform AppleScript step to a FileMaker Pro script and click on the Specify button. To perform the same commands each time the script is run, type up to 32K of text into the script text portion of the script step. FileMaker Pro will compile the script when you click OK and will not
ify you of any compilation errors.
To perform different AppleScript commands each time the script is run, click the specify field button and select a field which contains AppleScript commands. FileMaker Pro will compile the commands when the script is performed.
E:Performing AppleScript Commands from FileMaker Pro ScriptsG
Note that FileMaker Pro does not support sending Apple events or AppleScript commands to itself through ScriptMaker. To do this, it is necessary to create an applet, droplet, or scripting application that directs commands at FileMaker Pro. You can, however, use the Perform AppleScript step to execute a routine or event in the other scripting application that can accomplish this.
Introv
ernal hierarchical menu item in the Scripts menu. When an application creates a new menu or menu item, it sends a Create event with an initial data parameter specifying the properties of the new item.
The properties of the menu item that should be set with t
his event are:
1) the Notify Address property (0 for normal FileMaker Pro menus.) This should be the process ID of the application that will be notified when the new menu item is selected.
2) the Unique ID property.
When the menu item is chosen, FileMaker Pro sends a Menu Selected event (class ID: kMEN, event ID: kMIS) to the target application, with the Unique ID and Notify Address from the chosen menu.
External MenusG
Introv
Introv
efining the standard objects and events that are sent, the Apple Events Registry also defines standard data types for exchanging information. Some of these types are the same as the common Clipboard formats that most applications already understand (text, picture, sound, QuickTime).
Picture Management
When managing large data types such as TIFF files, EPS files, or QuickTime movies it is often more efficient to use the Clipboard than to get the data of the object via Appl
e events. In this case, use the Go To event to navigate to a container field along with the Copy event to transfer the object to the Clipboard. When transferring data via the Clipboard it is necessary to activate the target and source applications.
It also possible using Apple events to set a reference to a picture file inside a container field
for example, set cell 1 to file "Macintosh HD: My Picture". FileMaker Pro treats the image as if it was imported using the "store file refere
mE(Pictures, Movies, Sounds, and Data TypesG
Picture File Reference Examples
Importing a single picture file reference using choose file
set cell "Picture Field" of record 1 to file ((choose file) as string)
Note: In this example, "choose file" returns an alias, so it is necessary to coerce the result to type "file."
Importing a folder of picture files
set folderPath to "Macintosh HD:Picture Folder:"
repeat with pictureFile in (list folder folderPath)
set pictureFileRef to (folderPath & pictureFile)
tell application "FileMakerB
Pro"
set newRecord to create record
set cell "Picture Field" of newRecord to file (pictureFileRef)
end tell
end repeat
Note: The "list folder" command from the File Commands scripting addition to obtain a list of files from a folder.
erence" option. Note: the reference to the picture must be of type "file".
Data Types & Coercion
It is possible to get and set styled data with FileMaker Pro cells using the "styled text" coercion. For example, the following script command would retrieve data from a cell and preserve all font and style information: cell 1 as styled text.
FileMaker also supports coercion of data to text so that data can be returned in a tab-separated format similar to what is copied to the clipboard wheD
n performing a Copy Record script step. For example, to get a return-separated string of all the values within a value list use a command such as choices of cell 1 as text. This can also be used to return records with portals in a tab-separated format.
kAEDatabaseSuiteZ
'DATA'\
kAESort]
'SORT'^
keyDirectObject
keyAESortElement
keyAESortType_
typeObjectSpecifier
typeObjectSpecifier
typeEnumeration`
a,The layout with which to display the results
The fields on which to sort
The order in which to sortf
FileMaker Pro sorts the currently found records.
If no "direction" parameter is specified, FileMaker Pro performs the sort in ascending order.
Note: The user must have read access for all fields specified in the event.g3Sorts the indicated layout by the specified fields.h
in orderk
'----'
'SRTE'
'SRTT'
sort <> by <sort fields> in order <sort direction>
sort layout named "Monthly Sales Report" by {field named "Region", field named "State"}
sort by {field 6, field 4, field 1} direction custom
identifies
identify
ignored
image
implicit
important
imported
addition
defining
standard
objects
events
addition
sending
apple
events
filemaker
scripts
order
advantage
capabilities
object
model
objects
defined
include
includes
including
incomplete
index
indicate
indicated
individual
In addition to defining the standard objects and events that are sent, the Apple Events Registry also defines standard data types for exchanging information. Some of these types are the same as the common Clipboard formats that most applications already understand (text, picture, sound, QuickTime).
Picture Management
When managing large data types such as TIFF files, EPS files, or QuickTime movies, it is often more efficient to use the Clipboard than to get the data of the object via App
le events. In this case, use the Go To event to navigate to a container field along with the Copy event to transfer the object to the Clipboard. When transferring data via the Clipboard, it is necessary to activate the target and source applications.
It also possible using Apple events, to set a reference to a picture file inside a container field
for example, set cell 1 to file "Macintosh HD: My Picture". FileMaker Pro treats the image as if it was imported using the "store file ref
What can I do with it?
Use the Sort event to reorder the currently found records in a FileMaker Pro file.
The Sort event has three components:
The layout to be sorted, which is the layout where the sort results are displayed. If no layout is provided, the current one is used.
The field by which the layout is sorted. If no field is provided, FileMaker Pro will unsort the database.
The direction of the sort
ascending, descending, or custom. If no direction is provided, FileMaker P
ro will sort in ascending order. Sorting a field by custom order uses the value list associated with the field on the specified layout (or the current layout if none is specified).
You can specify more than one field to do a multiple level sort.
Examples
For AppleScript users:
If you want to: You can say:
sort by one field sort by field "Record Number"
sort by one field in
descending order sort layout "Monthly Sales Report" by field
"Region" in order descending
sort by two fields, different orders sort layout 1 by {field "ID", field "Last"}
in order {descending, ascending}
unsort a database sort window 1
For Frontier users:
To unsort from Frontier add the following script to the FileMaker table:
on unSort(obj)
return(appleEvent(FileMa
ker.ID,'DATA','SORT','----',obj))
If you want to: You can say:
with FileMaker
sort window 1 by field 1 in ascending order sort(window[1],field[1],descending)
sort window 1 by field 1 in descending order sort(window[1],field[1],ascending)
sort window 1 by field 1 in custom order sort(window[1],field[1],custom)
unsort t
he frontmost database unSort(window[1])
All Frontier examples assume a table called FileMaker, provided with Frontier, is installed in the Frontier.root.
Sortt
Sortu
Eventv
Relational Data Examples
In this example, a relationship based on Invoice ID has been defined between two databases - Invoices and Line Items. The current layout in the Invoices database has the Invoice ID field (field 1) and a portal containing the Product field (field 2) from the Line Items database.
There are many different ways to access and create related data. Here are a few examples of script statements that can be used to get, set, and create related data.
To do this Perform
these commands Result
get related data from a record record 1 {"1001", {"Shoes", "Gloves"}}
get data from a related field field 2 {"Shoes", "Gloves"}
field "Line Items::Product" {"Shoes", "Gloves"}
get data from a related cell cell 2 {"Shoes", "Gloves"}
cell "Line Items::Product" {"Shoes", "Gloves"}
add a row to a portal set cell 2 of record 1 to
{"Shoes", "Gloves", "Hat"}
{"Shoes", "Gloves", "Hat"}
set record 1 to
{"1001", {"Shoes", "Glo
arated by two colons such as "Contacts::First Name". Similarly, the ID of a related field includes an identifier for the relationship. For example, {1, 2} is the unique identifier for a related field whose ID is 2 in the related file as defined by the relationship whose identifier is 1. To access a related field it must exist on a layout in the master file.
The name of a related cell includes the name of the relationship separated by two colons such as "Contacts::First Name". Similar
zly, the ID of a related cell includes an identifier for the relationship. For example, the cell ID {1, {2, 3} is the unique identifier for a related cell of the record in the local database whose ID is 1, using the field of the related database whose ID is 3 as defined by the relationship whose ID is 2. To access a related cell it must exist on a layout in the master file.
Relational Data AccessG
The name of a related field includes the name of the relationship separa
create a related record. If the field is within a portal, set the field equal to one extra list value. For example, if the portal field contains two rows, set the field equal to a list of three items.
Note: in order to create related records, the option to create related records must be enabled for the relationship.
When getting data from a portal, the number of records returned is determined by whether the portal has a vertical scroll bar or not. If a portal has no scroll bar, onl
y the visible portal rows will be returned. When there is a scroll bar on the portal, all portal rows will be returned including those not currently visible.
Deleting a record from the local file will also delete any related records when the option to delete related records has been enabled (i.e., a "cascading delete").
Note: FileMaker Pro does not support the deletion of individual portal rows via Apple events.
The name of a related field includes the name of the relationship sep
Related fields placed on layouts can be accessed via Apple events. Fields and cells within portals can be edited, and related records created and deleted, using standard Apple events such as Set Data, Create, and Delete.
Here are some points to keep in mind when accessing related data:
Portals act very much like repeating fields. A field within a portal is represented by a list of data where each item in the list is a separate portal row.
The portal itself is represented as a list of
fields. For example, getting data from a record with a portal returns all the portal fields within a list.
When getting data from a record, related fields are returned after fields from the local file.
Because related fields are layout-specific, there are no related fields or portals on Layout 0. Layout 0 represents the entire local database.
To create a new related record, set a new item into a related field. For instance, if a related field is empty, setting data into it will
In order to take advantage of some of the new capabilities of FileMaker Pro 3.0, scripts that were created for previous versions of FileMaker Pro will need to be modified in the following ways:
Renaming the Application
When converting a script created with AppleScript that was compiled with version 2.x of FileMaker Pro, the Script Editor may not correctly compile with FileMaker Pro 3.0 if the applications have the same name, such as
FileMaker Pro
. For this reason it is necessary to rena.x of FileMaker Pro, the Script Editor may not correctly compile with FileMaker Pro 3.0 if the applications have the same name, such as
FileMaker Pro
. For this reason it is necessary to rena
me one of the applications to something different such as
FileMaker Pro 2.1
A quick way to verify which application is being used is to look at the case of the application commands. FileMaker Pro 3.0 uses lowercase for all objects and events whereas previous versions use uppercase.
The Show Event
Scripts created with earlier versions of FileMaker Pro that make use of the Show event will need to be revised in the following cases:
- The Show event now supports the distinction between t
he database and document objects which refer to the entire set of records versus the records in the found set. Because the Show event uses the found set as default containment, it is necessary to rewrite previous scripts to reference the database object if you wish to find records from the entire database.
For example, the statement
show every record
should be rewritten to say
show every record of database 1
- FileMaker Pro find symbols such as !, //, ?, *, @ are no longer supported
with the Show event. To use FileMaker find symbols, create requests and set the special characters into cells of the request. Note that many of these types of find requests can still be accomplished using the Show event but require using AppleScript terminology instead of the FileMaker Pro symbol. Equivalent commands are listed in the documentation for the Show event.
- The Show event no longer brings a window, database, or document to the front. To bring a window to the front use the Go
To event.
Value Lists
Because value lists are now assigned to fields in layout mode, the Choices property is layout-specific. In this way a field can have different value lists depending on what layout it is on. Scripts that previously relied on Layout 0 to obtain choices of a field will now return an empty list because value lists can only be applied to a field on a given layout.
Sorting by Custom Order
FileMaker Pro 3.0 now allows you to choose a value list when sorting (before it a
ssumed the value list that was defined for the field in field definitions). To sort a field by custom order with Apple events, FileMaker Pro 3.0 uses the value list associated with the field on the specified layout.
Opening Files
Sending an open document event to a file that has a blank password will automatically open the file with that password. Previous versions of FileMaker Pro displayed the password dialog.
Converting Previous ScriptsG
Scripts with the following statements will need to be revised:
Previous Syntax New Syntax
show every record show every record of database 1
show every record whose cell "Date" = "//" set cell "Date" of (create request) to "//"
show every record whose cell "Name" = "Jo" show every record whose cell "Name" contains "Jo"
show window 1 go to window 1
choices of every field of layout 0 choices of every field of layout "Data Entry"
Introv
@with versi
For more information about Apple Events, AppleScript, Frontier, the Apple Events Registry, and the Object Model, refer to the following references:
PUBLICATIONS
Danny Goodman
s AppleScript Handbook
Danny Goodman
Random House Electronic Publishing, ISBN 0-679-75806-2.
The Tao of AppleScript
Derrick Schneider
Hayden Books, ISBN 1-56830-075-1.
AppleScript Language Guide: English Dialect
Addison-Wesley, ISBN 0-201-40735-3.
INSIDE MACINTOSH: Interapplication Communication
Addison-Wesley
Inside Macintosh, Volume VI; Chapter 6: Apple Events Manager;
Addison Wesley Publishing Company, Inc., Menlo Park, California
April 1991
Apple Event Registry: Standard Suites
Apple Programmers and Developers Association (APDA).
The Object Model, Macintosh Developer Note
Apple Programmers and Developers Association (APDA).
In the U.S. contact APDA at (800) 282-2732; in Canada (800) 637-0029; or international (716) 871-6555.
PRODUCTS
AppleScript Scripter
s Kit
Available through Ap
ple retail channels.
AppleScript Software Development Toolkit
Available from APDA.
UserLand Frontier
UserLand Software, Inc.
UserLand Software can be reached at (415) 369-6600.
ONLINE FORUMS
AppleLink
Developer Support: AppleScript Talk
Third Parties:Third Parties A-G:Claris:Claris InfoCenter:Technical Support - (Read):Technical Support - FileMaker
Third Parties: Third Parties P-Z: UserLand Discussions
The MACSCRPT mailing list is a highly active forum devoted to scripting on the Macintosh and focuses on AppleScript and UserLand Frontier. To subscribe to the Macintosh Scripting mailing list send a message using one of the following methods:
To subscr
ibe to the MACSCRPT list,
Send message to: LISTSERV@dartmouth.edu
Subject: subscribe
Message: subscribe macscrpt <your full name here>
To receive the mail as daily digest:
Send message to: LISTSERV@dartmouth.edu
Subject: digest
Message: set macscrpt digest
Scripts, scripting additions, demos, and other scripting-related files can be found at the following ftp site:
ftp://gaea.kgs.ukans.edu/applescript
SCRIPTING SUPPORT
Apple Computer provides support for AppleScript and HyperCard.
All customers have access to toll-free telephone support for pre-sales and
up and running
support by calling Apple Assurance at (800) SOS-APPL. Advanced scripting support is available for a fee by calling (800) 950-2442.
TRAINING
Self-paced and classroom-based instruction is available from Apple Computer's Developer University (408) 974-4897, fax (408) 974-0544, and AppleLink: DEVLINK. Currently course offerings include "Scripting with AppleScript", "Introduction to AppleScript", and "
G&Apple Events/AppleScript Programming."
ReferencesG
Introv
Helvetica
Palatino
Geneva
Courier
Chicago
CXB Futura CondExtraBold
Times
Optima
Find an Event or Object
Cancel Find
Continue Find
Object & Events List
Go to Help
Go to Event or Object Layout
Go to Details Layout
Go Next Record
Go Previous Record
Go to Perform AppleScript
Descriptions
Object Hierarchy
Object Map
Go To (cApplication)
Go To (cCell)
Go To (cColumn)
Go To (cDatabase)
Go To (cDocment)
Go To (cFileMakerScript)
Go To (cMenu)
Go To (cMenuItem)
Go To (cRequest)
Go To (cRow)
Go To (cTable)
Go To (cWindow)
Go To (Sort)
Go To (Begin Transaction)
Go To (Close)
Go To (Count)
Go To (Class Info)
Go To (Create New)
Go To (Data Size)
Go To (Delete)
Go To (Do Menu)
Go To (Do Script)
Go To (Duplicate)
Go To (End Transaction)
Go To (Event Info)
Go To (Exists)
Go To (Find)
Go To (Get Data)
Go To (GetURL)
Go To (Go To)
Go To (Open)
Go To (Open Application)
Go To (Open Documents)
Go To (Print)
Go To (Print Documents)
Go To (Quit Application)
Go To (Save)
Go To (Set Data)
Go To (Show)
AE from Beginning
Apple Event & Object Matrix
Start up Script
Open Script
A Main Menu
Introduction to Apple Events
intro
Find all Events
event
Find all Objects
object
Go to Help
Find an Event or Object
Object & Events List
Object
event
Go to Event or Object Layout
Go Next Record
Go Previous Record
Descriptions
Object
event
Go To (Open Application)
Go To (Quit Application)
Go To (Open Documents)
open doc
Go To (Print Documents)
print
Go To (cCell)
ccell
Go To (cColumn)
cColumn
Go To (cDatabase)
t cDatabase
Go To (cRow)
Go To (cTable)
cTable
Go To (Sort)
open app
Go To (cMenu)
Menuu
Object
Go To (cMenuItem)
t cmenuitem
Go To (Begin Transaction)
begin tran
Go To (End Transaction)
t end trans
Go To (Do Script)
t do script
Go To (Do Menu)
do Menu
Go To (cApplication)
cApplication
Go To (cWindow)
cwindow
Go To (cDocment)
Go To (Duplicate)
t duplicate
Go To (Get Data)
get data
Go To (Close)
close
Go To (Data Size)
t data size
Go To (Count)
count
Go To (Event Info)
event info
Go To (Create New)
create new
Go To (Open)
document
application
Go To (Delete)
t cDocument
Go To (Print)
print
Go To (Exists)
exists
Go To (Save)
Go To (Class Info)
class info
Go To (Set Data)
Set Data
Go To (cFileMakerScript)
cFileMakerScript
Start up Script
delete
Go To (Show)
AE from Beginning
Apple Event & Object Matrix
Go To (cRequest)
cRequestu
Object
Go To (Go To)
go to
Go To (Find)
findu
Event
Go to Perform AppleScript
E:Performing AppleScript Commands from FileMaker Pro Scripts
Go to Details Layout
Go To (GetURL)
geturl
Open Script
Object Hierarchy
Object Map
Cancel Find
Continue Find
= "All Objects"
( = "All Events"
= "All Topics"
All Objects
All Events
All Topics
= "All Objects"
All Objects
( = "All Events"
All Events
= "All Topics"
All Topics
5 = "Object"
Object
5 = "Event"
Event
3333D
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
33ffD
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
ffffJ
wwwwww
UUUUUU
DDDDDD
""""""
33ffD
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
33ffD
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
33ffD
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
LISTA
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
33ffD
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
3333D
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
wwwwww
ffffff
333333
""""""
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
(LIST
LISTA
VDEFA(
(LIST
LISTA6name
absolute position
range
relative position
VDEFA(
(LIST
LISTA
Event
Object
VDEFA(
(LIST
LISTAsAll Objects
Application
Database
Document
Field
FileMaker Script
Layout
Menu Item
Record
Request
Window
VDEFA(
(LIST
~ffff
ffffff
ffff33
ff33ff
ff3333
33ffff
33ff33
333333
wwwwww
UUUUUU
DDDDDD
""""""
(LIST
All Topics
What are Apple Events
The Components of an Apple Event
The Object Model
More About Objects
Specifying Objects
Apple Event Suites
The FileMaker Suite
Supported Reference Forms
Default Containment
FileMaker Pro Layouts
Fields and Field Order
Lists as Parameters
Transactions
Sending Apple Events from FileMaker Pro Scripts
More About FileMaker Pro Scripts
Performing AppleScript Commands from FileMaker Pro Scripts
External Menus
Pictures, Movies, Sounds, and Data Types
RelationaB4l Data Access
Converting Previous Scripts
References
VDEFA(
EResultReq ListB
OClassKeyForms ListC
Record Type ListD
ObjectsE
EventsF
Topics
All Events
Begin Transaction
Class Info
Close
Count
Create New
Data Size
Delete
Do Menu
Do Script
Duplicate
End Transaction
Event Info
Exists
Get Data
GetURL
Go To
Open Application
Open Documents
Print (files)
Print (objects)
Set Data
VDEFA(
Main Menu
Introduction to Apple Events
Find all Events
Find all Objectsts
Find all Objects
Related fields placed on layouts can be accessed via Apple events. Fields and cells within portals can be edited, and related records created and deleted, using standard Apple events such as Set Data, Create, and Delete.
Here are some points to keep in mind when accessing related data:
Portals act very much like repeating fields. A field within a portal is represented by a list of data where each item in the list is a separate portal row.
The portal itself is represented as a list of
fields. For example, getting data from a record with a portal returns all the portal fields within a list.
When getting data from a record, related fields are returned after fields from the local file.
Because related fields are layout-specific, there are no related fields or portals on Layout 0. Layout 0 represents the entire local database.
To create a new related record, set a new item into a related field. For instance, if a related field is empty, setting data into it will
0C:ves", "Hat"}}
{"1001", {"Shoes", "Gloves", "Hat"}}
Introv
Examples
field provides some samples for using the event using a fictitious syntax similar to the HyperTalk language. The
Notes
field provides some additional information about the event. Extensions to
!Gthe standard parameters for events are denoted by their bold keywords.
Introv
An Apple event consists of several components:
event name
event class
event ID
event parameters
Each component of the event is represented by a four-character code such as 'aevt' or 'oapp'.
The event name is a short description of the event. The event class groups related events together. The event ID uniquely identifies the event. The number of parameters and their meaning varies depending on the Apple event. An example of a parameter is the
direct object
parameter
four-character
fromE
front
frontier
frontmost
fully
functionally
functionally
related
objects
events
grouped
together
general
generate
generates
getting
given
givesE
goodman
goodman's
graphical@
identifies@
info@
necessary@
publications@
specify
support
ccolumn
elements
ctable
object
correspond
toll-free
sending
events
filemaker
performs
analysis
whereas@
sending
apple
events
filemaker
scripts@
filemaker
record@
pnamex
floating@
containing|
field
global
field@
access
current
user~
persistent
unique
filemaker
script@
window
title
documentw
absolute
position@
endt@
object
class
query@
desired
detailedE
determine
determined
developer
developers
development
devlink
devoted
dialect
dialog
dialogs
different
digest
direct
directly
discussion
discussions
displayed
distinction
document
document's
documentation
documents
duration
earlier
edited
editing
editor
edu/applescript
efficient
electronic
elements
empty
enabled
engaged
english
english-like
ensure
ensuring
entire
equal
equivalent
errors
establish
event
event
class
event
event
event
parameters
filemaker
supports
simple
object
specifiers
rd which has incomplete or invalid data. In these cases, an attempt to access the database via Apple events will fail. The client application should try again at a later time.
TransactionsG
Introv
FileMaker Pro scripts can send Apple events to other applications. To do this, add a Send Apple Event step to a FileMaker Pro script and click on the Specify button. An Open File dialog appears, prompting you for a target file for the Apple event. Depending on the type and creator of the target file, FileMaker Pro chooses the event class and ID with a
best guess
of the Apple event to send. Pop-up menus let you change these values if another event is desired.
If a document file was
support
supported
supportsE
symbol
symbols
syntax
system
tab-separated
tableE
tabular
takenE
target
technical
technically
technology
telephone
terminology
testing
sending
events
filemaker
performs
analysis
where
By using the Menu and Menu Item objects, other applications can create menus in FileMaker Pro, as well as send Do Menu events to the existing menus of FileMaker Pro. FileMaker Pro supports the addition of custom menus under the External hierarchical menu item in the Scripts menu. When an application creates a new menu or menu item, it sends a Create event with an initial data parameter specifying the properties of the new item.
The properties of the menu item that should be set with t
his event are:
1) the Notify Address property (0 for normal FileMaker Pro menus). This should be the process ID of the application that will be notified when the new menu item is selected.
2) the Unique ID property.
When the menu item is chosen, FileMaker Pro sends a Menu Selected event (class ID: kMEN, event ID: kMIS) to the target application, with the Unique ID and Notify Address from the chosen menu.